Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import java.util.ArrayList;
  2. import java.util.List;
  3.  
  4. public class Room {
  5. private List<Bed> beds = new ArrayList<Bed>();
  6. private boolean vacant = true;
  7.  
  8. public int getNumberOfBeds(){
  9. return beds.size();
  10. }
  11.  
  12. public Bed getBed(int index){
  13. return beds.get(index);
  14. }
  15.  
  16. public void addBed(String bedSize){
  17. beds.add(new Bed(bedSize));
  18. }
  19.  
  20. public boolean getVacancy(){
  21. return vacant;
  22. }
  23.  
  24. public void setVacancy(boolean vacant){
  25. this.vacant = vacant;
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement