Advertisement
Guest User

Untitled

a guest
May 6th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. public class Vehicle{
  2. private int noOfTyres;
  3. private Boolean accesories;
  4. private String brand;
  5. private int static counter=0;
  6. private int counterNum;
  7.  
  8. public Vehicle(int noOfTyres, int accessories, int brand){
  9. counter++;
  10. this.noOfTyres= noOfTyres;
  11. this.accessories= accessories;
  12. this.brand= brand;
  13. counterNum= counter;}
  14.  
  15. }
  16.  
  17. public class Vehicle{
  18. private int noOfTyres;
  19. private Boolean accesories;
  20. private String brand;
  21. private int counter=0;
  22.  
  23.  
  24. public Vehicle(int noOfTyres, int accessories, int brand){
  25. counter++;
  26. this.counter= counter;
  27. this.noOfTyres= noOfTyres;
  28. this.accessories= accessories;
  29. this.brand= brand;
  30. }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement