PIbd-23-Radaev-A.V.-20/Catamaran/EntityCatamaran.cs

29 lines
607 B
C#
Raw Normal View History

2023-10-31 12:23:01 +04:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Catamaran
2023-10-31 12:27:43 +04:00
{
public class EntityCatamaran
2023-10-31 12:23:01 +04:00
{
2023-10-31 12:27:43 +04:00
2023-10-31 12:23:01 +04:00
public int Speed { get; private set; }
2023-10-31 12:27:43 +04:00
public double Weight { get; private set; }
2023-10-31 12:23:01 +04:00
2023-11-25 20:02:11 +04:00
public Color BodyColor { get; set; }
2023-10-31 12:27:43 +04:00
2023-10-31 12:23:01 +04:00
public double Step => (double)Speed * 100 / Weight;
2023-10-31 12:27:43 +04:00
2023-11-25 20:02:11 +04:00
public EntityCatamaran(int speed, double weight, Color bodyColor)
2023-10-31 12:23:01 +04:00
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
}
}
}