From 9965a02c98d76e6d39982bc7a846bf062010c753 Mon Sep 17 00:00:00 2001 From: ekallin Date: Sat, 23 Sep 2023 19:20:20 +0400 Subject: [PATCH] Created base class EntityLocomotive"" --- .../EntityLocomotive.cs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ProjectElectricLocomotive/ProjectElectricLocomotive/EntityLocomotive.cs diff --git a/ProjectElectricLocomotive/ProjectElectricLocomotive/EntityLocomotive.cs b/ProjectElectricLocomotive/ProjectElectricLocomotive/EntityLocomotive.cs new file mode 100644 index 0000000..9ea8501 --- /dev/null +++ b/ProjectElectricLocomotive/ProjectElectricLocomotive/EntityLocomotive.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ProjectElectricLocomotive +{ + public class EntityLocomotive + { + public int Speed { get; private set;} + public double Weight { get; private set;} + public Color BodyColor { get; private set;} + public double Step => (double) Speed * 100 / Weight; + public EntityLocomotive(int speed, double weight, Color bodyColor) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + } + } +}