/** * A room is a location at which a session may be scheduled. * * @author Dr. Jody Paul * @version 28 February 2006 */ public class Room { /** The building in which the room exists. */ private String building; /** The room number. */ private String roomNumber; /** * Construct a Room object. * @param theBuilding the building * @param theRoomNumber the room number */ public Room(String theBuilding, String theRoomNumber) { building = theBuilding; roomNumber = theRoomNumber; } /** * Return the building. * @return the building */ public String getBuilding() { return building; } /** * Return the room number. * @return the room number */ public String getRoomNumber() { return roomNumber; } /** * Determine if two rooms have the same information; * that is, the strings for building are equivalent and * the strings for room number are equivalent. * @param other the room to compare with this room * @return true if the rooms have the same building and room number */ public boolean equals(Room other) { return ((this.getRoomNumber().equals(other.getRoomNumber())) && (this.getBuilding().equals(other.getBuilding()))); } }