2024-04-11 11:18:53 +04:00
|
|
|
|
namespace ProjectBus.Entities;
|
2024-02-29 10:45:00 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Класс-сущность "Автобус"
|
|
|
|
|
/// </summary>
|
2024-04-11 11:18:53 +04:00
|
|
|
|
public class EntityBus : EntitySimpleBus
|
2024-02-29 10:45:00 +04:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Дополнительный цвет (для опциональных элементов)
|
|
|
|
|
/// </summary>
|
2024-04-11 11:18:53 +04:00
|
|
|
|
///
|
2024-02-29 10:45:00 +04:00
|
|
|
|
public Color AdditionalColor { get; private set; }
|
2024-04-11 11:18:53 +04:00
|
|
|
|
public Color BodyColor { get; private set; }
|
2024-02-29 10:45:00 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-04-11 11:18:53 +04:00
|
|
|
|
/// Признак (опция) наличия дополнительного отсека
|
2024-02-29 10:45:00 +04:00
|
|
|
|
/// </summary>
|
|
|
|
|
public bool AdditionalCompartment { get; private set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2024-04-11 11:18:53 +04:00
|
|
|
|
/// Признак (опция) наличия гармошки
|
2024-02-29 10:45:00 +04:00
|
|
|
|
/// </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>
|
2024-04-11 11:18:53 +04:00
|
|
|
|
public EntityBus(int speed, double weight, Color bodyColor, Color additionalColor, bool additionalCompartment, bool accordion) : base(speed, weight, bodyColor)
|
2024-02-29 10:45:00 +04:00
|
|
|
|
{
|
|
|
|
|
AdditionalColor = additionalColor;
|
2024-04-11 11:18:53 +04:00
|
|
|
|
BodyColor = bodyColor;
|
2024-02-29 10:45:00 +04:00
|
|
|
|
AdditionalCompartment = additionalCompartment;
|
|
|
|
|
Accordion = accordion;
|
|
|
|
|
}
|
|
|
|
|
}
|