using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ProjectElectricLocomotive.Entities { /// /// Класс-сущность "Локомотив" /// public class EntityLocomotive { /// /// Скорость /// public int Speed { get; private set; } /// /// Вес /// public double Weight { get; private set; } /// /// Основной цвет /// public Color BodyColor { get; private set; } /// /// Шаг перемещения Локомотива /// public double Step => Speed * 100 / Weight; /// /// Конструктор сущности /// /// Скорость /// Вес локомотива /// Основной цвет public EntityLocomotive(int speed, double weight, Color bodyColor) { Speed = speed; Weight = weight; BodyColor = bodyColor; } } }