Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Car{
- private final int maxSpeed;
- private int speed;
- private final float tankCapacity;
- private int currentFuel;
- private boolean MotorOn;
- private int x;
- public Car(int maxSpeed, float tankCapacity){
- this.maxSpeed = maxSpeed;
- this.speed = 0;
- this.tankCapacity = tankCapacity;
- this.currentFuel = tankCapacity;
- this.x = 0;
- this.MotorOn = true;
- this.x = 0;
- }
- //add some methods
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement