import java.awt.Color; import java.util.Random; public class EntityAirbus { private int Speed = 0; private float Weight = 0; private Color BodyColor; public int getSpeed(){return Speed;} public float getWeight(){return Weight;} public Color getBodyColor(){return BodyColor;} public float Step(){return Speed * 100 / Weight;} public void Init(int speed, float weight, Color bodyColor) { Random rand = new Random(); if (speed <= 0) speed = rand.nextInt(350, 550); else { Speed = speed; }; if (weight <= 0) weight = rand.nextFloat(350, 550); else { Weight = weight; } BodyColor = bodyColor; } }