/******************************************************************
 * Program: Room
 *
 * Programmer: Tyler Johnson
 *
 * Due Date: N/A

 *
 * COMP 110-001        Instructor: Tyler Johnson
 *
 * Description: This file defines the class Room, which maintains
 *				the number of people in a room.  The class also
 *				maintains a static variable that holds the number
 *				of people in all rooms.
 *
 ******************************************************************/

public class Room  {

	private int numberInRoom;
	private static int totalNumber;
	
	public Room()  {
	
		numberInRoom = 0;
	}
	
	public Room(int initNumber)  {
	
		numberInRoom = initNumber;	
	}
	
	public void addOneToRoom() {
		numberInRoom++;
		totalNumber++;
	}
	
	public void removeOneFromRoom()  {
		//add later
		if(validRemoval(1))  {
			numberInRoom--;
			totalNumber--;
		}
	}
	
	public int getNumber()  {
		return numberInRoom;
	}
	
	public static int getTotal()  {
		return totalNumber;
	}
	
	public boolean validRemoval(int num)  {
	
		if(num <= numberInRoom)
			return true;
		else
			return false;
	
	}

	
}