Advertisement
Guest User

עעעע

a guest
Mar 19th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. public class Area
  2. {
  3. private int spaces;
  4. private String color;
  5. private int spacesTaken;
  6.  
  7. public Area (int spaces,String color,int spacesTaken){
  8. this.spaces= spaces;
  9. this.color= color;
  10. this.spacesTaken=spacesTaken;
  11. }
  12.  
  13. public String getColor()
  14. {
  15. return this.color;
  16. }
  17.  
  18. public void setColor(String color)
  19. {
  20. this.color = color;
  21. }
  22.  
  23. public int getSpaces()
  24. {
  25. return this.spaces;
  26. }
  27.  
  28. public void setSpaces(int spaces)
  29. {
  30. this.spaces = spaces;
  31. }
  32.  
  33. public int getSpacesTaken()
  34. {
  35. return this.spacesTaken;
  36. }
  37.  
  38. public void setSpacesTaken(int spacesTaken)
  39. {
  40. this.spacesTaken = spacesTaken;
  41. }
  42. public String ToString(){
  43.  
  44.  
  45. return "spaces " +spaces+" space taken "+spacesTaken+" color "+color;
  46.  
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement