public class Room
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
bldg
A building
|
int |
num
A room numer
|
| Constructor and Description |
|---|
Room(java.lang.String bldg,
int num)
Instantiates a room with a building and number.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Room r)
Determines whether two objects represent the same room.
|
java.lang.String |
toString()
Shows the name of the room.
|
public final java.lang.String bldg
public final int num
public Room(java.lang.String bldg,
int num)
bldg - The building where the room is locatednum - The room numberpublic boolean equals(Room r)
r - The other Room object to be comparedtrue if rooms are identical, false otherwisepublic java.lang.String toString()
toString in class java.lang.Object[BLDG]-[NUMBER]