Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Area
- {
- private int spaces;
- private String color;
- private int spacesTaken;
- public Area (int spaces,String color,int spacesTaken){
- this.spaces= spaces;
- this.color= color;
- this.spacesTaken=spacesTaken;
- }
- public String getColor()
- {
- return this.color;
- }
- public void setColor(String color)
- {
- this.color = color;
- }
- public int getSpaces()
- {
- return this.spaces;
- }
- public void setSpaces(int spaces)
- {
- this.spaces = spaces;
- }
- public int getSpacesTaken()
- {
- return this.spacesTaken;
- }
- public void setSpacesTaken(int spacesTaken)
- {
- this.spacesTaken = spacesTaken;
- }
- public String ToString(){
- return "spaces " +spaces+" space taken "+spacesTaken+" color "+color;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement