registrationsystem.model
Class Student

java.lang.Object
  extended by registrationsystem.model.Student

public class Student
extends java.lang.Object

Representation for a student


Constructor Summary
Student(java.lang.String name)
          Constructor
 
Method Summary
 void addEnrolledIn(java.lang.String courseId, EnrolledIn newEnrolledIn)
          Add a new enrollment for a course the student is in
 java.lang.String getName()
          Accessor for the student's name
 void printReport()
          Print a report on the student - list courses enrolled in
 void removeEnrolledIn(java.lang.String courseId)
          Remove the enrollment in a specific course
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Student

public Student(java.lang.String name)
Constructor

Parameters:
name - the student's name
Method Detail

getName

public java.lang.String getName()
Accessor for the student's name

Returns:
the student's name

addEnrolledIn

public void addEnrolledIn(java.lang.String courseId,
                          EnrolledIn newEnrolledIn)
                   throws java.lang.IllegalArgumentException
Add a new enrollment for a course the student is in

Parameters:
courseId - the id of the course
newEnrolledIn - the new enrollment to add
Throws:
java.lang.IllegalArgumentException - if the student is already enrolled in this course

removeEnrolledIn

public void removeEnrolledIn(java.lang.String courseId)
                      throws java.lang.IllegalArgumentException
Remove the enrollment in a specific course

Parameters:
courseId - the course
Throws:
java.lang.IllegalArgumentException - if the student is not enrolled in course

printReport

public void printReport()
Print a report on the student - list courses enrolled in