2023-10-18 12:33:39 +04:00
|
|
|
import java.awt.*;
|
|
|
|
|
|
|
|
public class BaseTanker {
|
|
|
|
private int Speed;
|
|
|
|
public int getSpeed() {
|
|
|
|
return Speed;
|
|
|
|
}
|
|
|
|
private void setSpeed(int speed)
|
|
|
|
{
|
|
|
|
Speed = speed;
|
|
|
|
}
|
|
|
|
private double Weight;
|
|
|
|
public double getWeight()
|
|
|
|
{
|
|
|
|
return Weight;
|
|
|
|
}
|
|
|
|
private void setWeight(double weight)
|
|
|
|
{
|
|
|
|
Weight = weight;
|
|
|
|
}
|
|
|
|
private Color BodyColor;
|
|
|
|
public Color getBodyColor()
|
|
|
|
{
|
|
|
|
return BodyColor;
|
|
|
|
}
|
2023-11-28 18:10:22 +04:00
|
|
|
public void setBodyColor(Color bodyColor)
|
2023-10-18 12:33:39 +04:00
|
|
|
{
|
|
|
|
BodyColor = bodyColor;
|
|
|
|
}
|
|
|
|
public double Step;
|
|
|
|
|
|
|
|
public BaseTanker(int speed, double weight, Color bodyColor)
|
|
|
|
{
|
|
|
|
Speed = speed;
|
|
|
|
Weight = weight;
|
|
|
|
BodyColor = bodyColor;
|
|
|
|
Step = (double)Speed * 100 / Weight;
|
|
|
|
}
|
|
|
|
}
|