Class Student

All Implemented Interfaces:
ILightObject, Serializable

public class Student extends Person
Since:
1.0 Oct 12, 2008, 1.0
Version:
%I%, %G%
Author:
Steph GAUDRY
See Also:
Serialized Form
  • Constructor Details

    • Student

      public Student()
    • Student

      public Student(int id, String lastName)
      Parameters:
      id -
      lastName -
    • Student

      public Student(String lastName, String firstName)
      Parameters:
      lastName -
      firstName -
    • Student

      public Student(Person person, int studentId)
  • Method Details

    • equals

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this student.
      Check is done on following fields :
      Some fields are not checked here :
      • scoreLists
      Overrides:
      equals in class Person
      Parameters:
      obj - the reference object with which to compare.
      Returns:
      true if this student is the same as the obj argument; false otherwise.
      See Also:
      Object.equals(java.lang.Object), hashCode()
    • hashCode

      public int hashCode()
      Returns a hash code value for the course.
      Hash is done on following fields :
      Some fields are not considered here :
      • scoreLists
      Overrides:
      hashCode in class Person
      Returns:
      a hash code value for this student.
      See Also:
      Object.hashCode(), equals(Object)
    • register

      public void register(Course course)
    • add

      public void add(Course course, Quotation quotation)
      Associates the specified Quotation with the specified Course key in this map (optional operation). If the map previously contained a mapping for the key, the old value is replaced by the specified value.

      Uses Map.put implementation.
      Parameters:
      course - key to store the quotation
      quotation - quotation to store
    • remove

      public void remove(Course course, Quotation quotation)
      Removes a given quotation from this student quotations.
      Parameters:
      course - key to retrieve the quotation.
      quotation - quotation to remove
    • remove

      public void remove(Course course)
      Removes all quotations for this student where the quotation course is the given course.
      Parameters:
      course -
    • getSchoolClass

      public SchoolClass getSchoolClass()
      Returns:
      the schoolClass
    • setSchoolClass

      public void setSchoolClass(SchoolClass schoolClass)
      Don't use this method to add a student into a class. This method does not make reverse link.
      Use SchoolClass.add(Student) instead of this to make bidirectional link.
      Parameters:
      schoolClass - the schoolClass to set
    • getScoreLists

      public Map<Course,​CourseScoreList> getScoreLists()
      Returns:
      the scoreLists
    • setStudentId

      public void setStudentId(int studentId)
      Parameters:
      studentId - the studentId to set
    • getStudentId

      public int getStudentId()
      Returns:
      the studentId