26 lines
574 B
Java
26 lines
574 B
Java
public class Course {
|
|
public int id;
|
|
public String title;
|
|
public int instructorID;
|
|
public String location;
|
|
public int studentCount;
|
|
|
|
public Course (int id, String title, int instructorID, String location) {
|
|
this.id = id;
|
|
this.title = title;
|
|
this.instructorID = instructorID;
|
|
this.location = location;
|
|
|
|
this.studentCount = 0;
|
|
}
|
|
|
|
// updates the room location of a given course ex. BIT-104 to BIT-110
|
|
public void updateLocation(String newLocation) {
|
|
this.location = newLocation;
|
|
}
|
|
|
|
public String toString() {
|
|
return this.id + " - " + this.title;
|
|
}
|
|
}
|