registrationsystem.controller
Interface RegController

All Known Implementing Classes:
Controller

public interface RegController

Each lab that utilizes the GUI will use an appropriate controller object that implements the following interface.


Method Summary
 void doDrop(java.lang.String courseId, java.lang.String studentName)
          Drop a specified student from a specified course
 void doEnroll(java.lang.String courseId, java.lang.String studentName)
          Enroll specified student in specified course
 void doGrade(java.lang.String courseId, java.lang.String studentName, java.lang.String grade)
          Set grade for specified student in specified course
 void doReportAllCourses()
          Print a report for all courses
 void doReportAllStudents()
          Print a report for all students
 void doReportCourse(java.lang.String courseId)
          Print a report for a specific course
 void doReportStudent(java.lang.String name)
          Print a report for a specific student
 java.lang.String[] getCourseIds()
          Get the course id's of all courses
 java.lang.String[] getStudentNames()
          Get the names of all students
 

Method Detail

getCourseIds

java.lang.String[] getCourseIds()
Get the course id's of all courses

Returns:
an array containg all the course id's

getStudentNames

java.lang.String[] getStudentNames()
Get the names of all students

Returns:
an array containing all the student names

doEnroll

void doEnroll(java.lang.String courseId,
              java.lang.String studentName)
              throws java.lang.IllegalArgumentException
Enroll specified student in specified course

Parameters:
courseId - id of the course
studentName - the name of the student
Throws:
java.lang.IllegalArgumentException - if the specified student cannot be enrolled in the specified course - message explains why

doDrop

void doDrop(java.lang.String courseId,
            java.lang.String studentName)
            throws java.lang.IllegalArgumentException
Drop a specified student from a specified course

Parameters:
courseId - id of the course
studentName - the name of the student
Throws:
java.lang.IllegalArgumentException - if the specified student cannot be dropped from the specified course - message explains why

doGrade

void doGrade(java.lang.String courseId,
             java.lang.String studentName,
             java.lang.String grade)
             throws java.lang.IllegalArgumentException
Set grade for specified student in specified course

Parameters:
courseId - id of the course
studentName - the name of the student
grade - the grade to assign
Throws:
java.lang.IllegalArgumentException - if the specified student cannot be given a grade for the specified course - message explains why

doReportAllCourses

void doReportAllCourses()
Print a report for all courses


doReportCourse

void doReportCourse(java.lang.String courseId)
                    throws java.lang.IllegalArgumentException
Print a report for a specific course

Parameters:
courseId - the ID of the course to print a report for
Throws:
java.lang.IllegalArgumentException - if no such course exists

doReportAllStudents

void doReportAllStudents()
Print a report for all students


doReportStudent

void doReportStudent(java.lang.String name)
                     throws java.lang.IllegalArgumentException
Print a report for a specific student

Parameters:
name - the nameof the student to print a report for
Throws:
java.lang.IllegalArgumentException - if no such student exists