using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AirBus { public class EntityAirBus { // Скорость public int Speed { get; private set; } // Вес public double Weight { get; private set; } // основной цвет public Color BodyColor { get; private set; } // доп. цвет public Color AdditionalColor { get; private set; } // наличие доп отсека для пассажиров public bool IsCompartment { get; private set; } // наличие доп двигателей public bool IsAdditionalEngine { get; private set; } // шаг перемещения public double Step => (double)Speed * 100 / Weight; public void Init (int speed, double weight, Color bodyColor, Color additionalColor, bool isCompartment, bool isAdditionalEngine) { Speed = speed; Weight = weight; BodyColor = bodyColor; AdditionalColor = additionalColor; IsCompartment = isCompartment; IsAdditionalEngine = isAdditionalEngine; } } }