PIbd22_Kamcharova_K.A._Doub.../DoubleDeckerBus/DoubleDeckerBus.cs

29 lines
929 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DoubleDeckerBus
{
public class EntityDoubleDeckerBus
{
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 Stairs { get; private set; }
public bool SecondFloor { get; private set; }
public double Step => (double)Speed * 100 / Weight;
public void Init(int speed, double weight, Color bodyColor, Color
additionalColor, bool secondFloor, bool stairs)
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
AdditionalColor = additionalColor;
Stairs = secondFloor;
SecondFloor = stairs;
}
}
}