PIbd-21_KozyrevSS_GasolineT.../BaseTanker.java

40 lines
784 B
Java
Raw Normal View History

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)
{
BodyColor = bodyColor;
}
public double Step;
public BaseTanker(int speed, double weight, Color bodyColor)
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
Step = (double)Speed * 100 / Weight;
}
}