PIbd-14_Rachek_A.S._Base/lab_0/Entities/EntityBus.cs
2024-05-22 22:22:59 +04:00

43 lines
1.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace ProjectBus.Entities;
/// <summary>
/// Класс-сущность "Автобус"
/// </summary>
public class EntityBus : EntitySimpleBus
{
/// <summary>
/// Дополнительный цвет (для опциональных элементов)
/// </summary>
///
public Color AdditionalColor { get; private set; }
public void setAdditionalColor(Color color)
{
AdditionalColor = color;
}
/// <summary>
/// Признак (опция) наличия дополнительного отсека
/// </summary>
public bool AdditionalCompartment { get; private set; }
/// <summary>
/// Признак (опция) наличия гармошки
/// </summary>
public bool Accordion { get; private set; }
/// <summary>
/// Инициализация полей объекта-класса спортивного автомобиля
/// </summary>
/// <param name="speed">Скорость</param>
/// <param name="weight">Вес автобуса</param>
/// <param name="bodyColor">Основной цвет</param>
/// <param name="additionalColor">Дополнительный цвет</param>
/// <param name="additionalCompartment">Признак наличия дополнительного отсека</param>
/// <param name="accordion">Признак наличия гармошки</param>
public EntityBus(int speed, double weight, Color bodyColor, Color additionalColor, bool additionalCompartment, bool accordion) : base(speed, weight, bodyColor)
{
AdditionalColor = additionalColor;
AdditionalCompartment = additionalCompartment;
Accordion = accordion;
}
}