public class Teacher extends Person
| Modifier and Type | Field and Description |
|---|---|
Room |
office
An office (not a lecture hall)
|
| Constructor and Description |
|---|
Teacher(java.lang.String firstName,
java.lang.String lastName,
Room office)
Create a new Teacher, with a name and office.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
toString()
Slightly modified version of the
Person.toString() method. |
public final Room office
public Teacher(java.lang.String firstName,
java.lang.String lastName,
Room office)
firstName - The teacher's first namelastName - The teacher's last nameoffice - The teacher's officepublic java.lang.String toString()
Person.toString() method.