package com.smokeyhotel.management.reservation;

import com.smokeyhotel.people.Person;
import com.smokeyhotel.people.guest.Guest;
import com.smokeyhotel.room.Room;

public class Reservation {
	
	private Guest master;
	private Room rooms[];
	
	public Reservation(Guest master, Room rooms[])
	{
		this.master = master;
		this.rooms = rooms;
	}

	public Room[] getRooms()
	{
		return this.rooms;
	}

	public int[] getRoomNumbers()
	{
		int[] rNumbers = new int[rooms.length];
		for(int i = 0; i <rooms.length; i++)
		{
			rNumbers[i] = rooms[i].getNumber();
		}
		return rNumbers;
	}
	

	public Guest[] getOccupants()
	{
		int guests = 0;
		for(int i = 0; i < rooms.length; i++)
		{
			for(int j = 0; j < rooms[i].getOccupants().length; j++)
			{
				
				guests++;
			}
		}
		Guest[] fatMen = new Guest[guests];
		int index = 0;
		for(int i = 0; i < rooms.length; i++)
		{
			for(int j = 0; j < rooms[i].getOccupants().length; j++)
			{
				index++;
				fatMen[index] = 
			}
		}
		return fatMen;
		
	}
	
	public Guest getMaster() {
		return master;
	}
	

	public void setMaster(Guest master) {
		this.master = master;
	}

}

@@ -44,16 +44,47 @@
 ion;%0D%0A%0D%0A
+import java.util.ArrayList;%0D%0A%0D%0A
 import c
@@ -683,22 +683,51 @@
 %0D%0A%09%09
-int guests = 0
+ArrayList%3CGuest%3E guests = new ArrayList%3C%3E()
 ;%0D%0A%09
@@ -850,267 +850,75 @@
 %0A%09%09%09
-%09guests++;%0D%0A%09%09%09%7D%0D%0A%09%09%7D%0D%0A%09%09Guest%5B%5D fatMen = new Guest%5Bguests%5D;%0D%0A%09%09int index = 0;%0D%0A%09%09for(int i = 0; i %3C rooms.length; i++)%0D%0A%09%09%7B%0D%0A%09%09%09for(int j = 0; j %3C rooms%5Bi%5D.getOccupants().length; j++)%0D%0A%09%09%09%7B%0D%0A%09%09%09%09index++;%0D%0A%09%09%09%09fatMen%5Bindex%5D = %0D%0A%09%09%09%7D%0D%0A%09%09%7D%0D%0A%09%09return fatMen;%0D%0A%09%09
+%7D%0D%0A%09%09%7D%0D%0A%09%09// Convert to array%0D%0A%09%09return (Guest%5B%5D) guests.toArray();
 %0D%0A%09%7D

Add getOccupants() implementation