Guest User

Untitled

a guest
Dec 7th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. public int getMaxOccupancy(){
  2. int occupancy = 0;
  3. for(int r=0;r<getNumberOfRooms();r++){
  4. for(int b=0;b<getRoom(r).getNumberOfBeds();b++){
  5. if(getRoom(r).getBed(b).getBedSize().equals("single")){
  6. occupancy++;
  7. }else{
  8. occupancy+=2;
  9. }
  10. }
  11. }
  12. return occupancy;
  13. }
Add Comment
Please, Sign In to add comment