public class Course
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
Department |
dept
A department, or "school"
|
Room |
hall
A room
|
java.lang.String |
name
A course name
|
int |
num
A course number
|
Teacher |
professor
A teacher
|
| Constructor and Description |
|---|
Course(Department dept,
int num,
java.lang.String name,
Room hall,
Teacher professor)
Initializes a course.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Course c)
Tests whether this course is identical to another course.
|
java.lang.String |
toString()
Displays the course.
|
public final Department dept
public final int num
public final java.lang.String name
public final Room hall
public final Teacher professor
public Course(Department dept, int num, java.lang.String name, Room hall, Teacher professor)
dept - Any Department value except Department.UNDECLAREDnum - The course numbername - The course namehall - The lecture hallpublic java.lang.String toString()
[DEPT]-[NUM] "[COURSE NAME]"toString in class java.lang.Objectpublic boolean equals(Course c)
c - another course