28 lines
687 B
C#
Raw Normal View History

2023-09-26 19:15:17 +04:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2023-09-26 19:32:10 +04:00
namespace Lab.Entities
2023-09-26 19:15:17 +04:00
{
2023-10-18 12:24:01 +04:00
public class BaseTanker
2023-09-26 19:15:17 +04:00
{
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;
2023-10-18 12:24:01 +04:00
public BaseTanker(int speed, double weight, Color bodyColor)
2023-09-26 19:15:17 +04:00
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
}
2023-11-14 23:39:34 +04:00
public void ChangeBodyColor(Color bodyColor)
{
BodyColor = bodyColor;
}
2023-09-26 19:15:17 +04:00
}
2023-09-26 19:32:10 +04:00
}