public class Course
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
classCount |
private java.lang.String |
courseCode |
private java.util.List<Student> |
courseRoster |
private int |
maxCapacity |
private java.lang.String |
name |
private PriorityQueue<Student> |
registrationQueue |
Constructor and Description |
---|
Course(java.lang.String classCode,
java.lang.String name,
int maxCapacity) |
Modifier and Type | Method and Description |
---|---|
void |
addStudent(Student student,
int coins)
Creates a new PriorityqueueItem - with appropriate priority(coins) and
this student in the item's queue.
|
java.lang.String |
getCourseCode() |
java.lang.String |
getCourseName() |
java.util.List<Student> |
getCourseRegister() |
void |
processRegistrationList()
Populates the courseRoster from the registration list.
|
private java.lang.String courseCode
private java.lang.String name
private int maxCapacity
private int classCount
private PriorityQueue<Student> registrationQueue
private java.util.List<Student> courseRoster
public Course(java.lang.String classCode, java.lang.String name, int maxCapacity)
public void addStudent(Student student, int coins)
student
- the studentcoins
- the number of coins the student haspublic void processRegistrationList()
public java.lang.String getCourseName()
public java.lang.String getCourseCode()
public java.util.List<Student> getCourseRegister()