|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectregistrationsystem.model.RegistrationModel
public class RegistrationModel
The main model for the registration system. Maintains and provides access to collections of courses, students, and grades.
| Constructor Summary | |
|---|---|
RegistrationModel()
Constructor |
|
| Method Summary | |
|---|---|
void |
addCourse(Course newCourse)
Add a course to the collection of courses |
void |
addLegalGrade(java.lang.String newLegalGrade)
Add a grade to the collection of legal grades |
void |
addStudent(Student newStudent)
Add a student to the collection of students |
java.util.Iterator<Course> |
courseIterator()
Allow access to all courses |
Course |
getCourse(java.lang.String id)
Lookup a course by id |
Student |
getStudent(java.lang.String name)
Lookup a student by name |
boolean |
isLegalGrade(java.lang.String grade)
Test to see if a grade is legal |
java.util.Iterator<Student> |
studentIterator()
Allow access to all students |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RegistrationModel()
| Method Detail |
|---|
public void addCourse(Course newCourse)
newCourse - the course to addpublic void addStudent(Student newStudent)
newStudent - the student to addpublic void addLegalGrade(java.lang.String newLegalGrade)
newLegalGrade - the grade to add
public Course getCourse(java.lang.String id)
throws java.lang.IllegalArgumentException
id - the id of the course desired
java.lang.IllegalArgumentException - if the course does not existpublic Student getStudent(java.lang.String name)
name - the name of the student desired
java.lang.IllegalArgumentException - if the student does not existpublic boolean isLegalGrade(java.lang.String grade)
grade - the grade to test
public java.util.Iterator<Course> courseIterator()
public java.util.Iterator<Student> studentIterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||