Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. public class Car{
  2.     private final int maxSpeed;
  3.     private int speed;
  4.     private final float tankCapacity;
  5.     private int currentFuel;
  6.     private boolean MotorOn;
  7.     private int x;
  8.  
  9.     public Car(int maxSpeed, float tankCapacity){
  10.         this.maxSpeed = maxSpeed;
  11.         this.speed = 0;
  12.         this.tankCapacity = tankCapacity;
  13.         this.currentFuel = tankCapacity;
  14.         this.x = 0;
  15.         this.MotorOn = true;
  16.         this.x = 0;
  17.     }
  18.  
  19.     //add some methods
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement