Advertisement
Killparadise

Example01

May 18th, 2015
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. public class Cars {
  2.  
  3.     private int speed;
  4.     private String plate;
  5.     private int location;
  6.  
  7.   public Cars() {
  8.  
  9.   }
  10.  
  11.   //Getters
  12.  
  13.   public int getSpeed() {
  14.     return speed;
  15.   }
  16.  
  17.   public String getPlate() {
  18.     return plate;
  19.   }
  20.  
  21.   public int getLocation() {
  22.     return location;
  23.   }
  24.  
  25.   //setters
  26.  
  27.   public void setSpeed(int speed) {
  28.     this.speed = speed;
  29.   }
  30.  
  31.   public void setPlate(String plate) {
  32.     this.plate = plate;
  33.   }
  34.  
  35.   public void setLocation(int location) {
  36.     this.location = location;
  37.   }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement