PIbd-21_KozyrevSS_GasolineT.../BaseTanker.java

40 lines
785 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;
}
private 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;
}
}