/** * Where we are. * * author R. Rosebrugh * version 2002-9-12 */ public class Room { // instance properties private int chairs; private int people; private String location; /** * Constructor for objects of class Room */ public Room() { // initialise instance properties chairs = 40; // for the particular room below people = 0; location = "Hart 101"; //where we are } /** * populate the room * * newpeople is the number going in * @return the sum of people and newpeople */ public int addPeople(int newPeople) { // adds return people + newPeople; } /** * de-populate the room * * exitPeople is the number going out * @return the difference of people and exitPeople */ public int peopleLeave(int exitPeople) { // subtracts return this.people - exitPeople; } }