nathan.middleware
Class StudentListImpl

java.lang.Object
  extended by nathan.middleware.StudentListImpl
All Implemented Interfaces:
java.io.Serializable, StudentList

public class StudentListImpl
extends java.lang.Object
implements StudentList, java.io.Serializable

The implementation class for the StudentList. StudentListImpl is used to store information about students in a list so it can be accessed later.

Author:
Nathan Balon
Advance Operating Systems CIS 578
University of Michigan Dearborn
Remote Method Invocation Middleware Project
See Also:
Serialized Form

Constructor Summary
StudentListImpl()
          Creates a new instance of StudentListImpl
 
Method Summary
 boolean addStudent(Student aStudent)
          adds a student to the student list
 boolean delStudent(java.lang.String aStudentNumber)
          deletes a student from the list
 Student find(java.lang.String aStudentNumber)
          find a specific student in the list
 Grade getGrade(java.lang.String aStudentNumber)
          get the grade of a student
 java.util.Vector getReplicatedObject()
          Get a copy of the student list
 java.util.Vector listAll()
          list all students in the student list
 boolean setGrade(java.lang.String aStudentNumber, Grade aGrade)
          setGrade set the grade for a student
 void setReplicatedObject(java.util.Vector<Student> studentList)
          Set the student list
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StudentListImpl

public StudentListImpl()
Creates a new instance of StudentListImpl

Method Detail

addStudent

public boolean addStudent(Student aStudent)
adds a student to the student list

Specified by:
addStudent in interface StudentList
Parameters:
aStudent - the student to be added
Returns:
the status of the operation

delStudent

public boolean delStudent(java.lang.String aStudentNumber)
deletes a student from the list

Specified by:
delStudent in interface StudentList
Parameters:
aStudentNumber - the student number of the student to be deleted
Returns:
boolean the status of the operation

listAll

public java.util.Vector listAll()
list all students in the student list

Specified by:
listAll in interface StudentList
Returns:
Vector of students

find

public Student find(java.lang.String aStudentNumber)
find a specific student in the list

Specified by:
find in interface StudentList
Parameters:
aStudentNumber - the student number of the student to be returned
Returns:
StudentImpl the student

setGrade

public boolean setGrade(java.lang.String aStudentNumber,
                        Grade aGrade)
setGrade set the grade for a student

Specified by:
setGrade in interface StudentList
Parameters:
aStudentNumber - the student number
aGrade - the grade to be set

getGrade

public Grade getGrade(java.lang.String aStudentNumber)
get the grade of a student

Specified by:
getGrade in interface StudentList
Parameters:
aStudentNumber - the student number
Returns:
GradeImpl

getReplicatedObject

public java.util.Vector getReplicatedObject()
Description copied from interface: StudentList
Get a copy of the student list

Specified by:
getReplicatedObject in interface StudentList
Returns:
Vector containing all of the students.

setReplicatedObject

public void setReplicatedObject(java.util.Vector<Student> studentList)
Description copied from interface: StudentList
Set the student list

Specified by:
setReplicatedObject in interface StudentList
Parameters:
studentList - A Vector containing all students.