40 lines
784 B
Java
40 lines
784 B
Java
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;
|
|
}
|
|
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;
|
|
}
|
|
}
|