29 lines
625 B
Java
29 lines
625 B
Java
|
package Trolleybus;
|
||
|
|
||
|
import java.awt.*;
|
||
|
|
||
|
public class EntityBus {
|
||
|
public int Speed;
|
||
|
public double Weight;
|
||
|
public Color BodyColor;
|
||
|
public double Step;
|
||
|
//геттеры
|
||
|
public int getSpeed() {
|
||
|
return Speed;
|
||
|
}
|
||
|
public double getWeight() {
|
||
|
return Weight;
|
||
|
}
|
||
|
public Color getBodyColor() {
|
||
|
return BodyColor;
|
||
|
}
|
||
|
public double getStep() {
|
||
|
return Step;
|
||
|
}
|
||
|
public EntityBus(int speed, double weight, Color bodyColor) {
|
||
|
Speed = speed;
|
||
|
Weight = weight;
|
||
|
Step = (double) Speed * 100 / Weight;
|
||
|
BodyColor = bodyColor;
|
||
|
}
|
||
|
}
|