Class Student

java.lang.Object
main.model.user.Student
All Implemented Interfaces:
Model, User, Mappable

public class Student extends Object implements User
This class represents a student, which is a type of user. It extends the User class and includes a student ID field.
  • Field Details

    • studentID

      private String studentID
      The ID of the student.
    • studentName

      private String studentName
      The name of a student
    • email

      private String email
      The email of a student
    • status

      private StudentStatus status
      The status of a student
    • supervisorID

      private String supervisorID
      The ID of the supervisor
    • projectID

      private String projectID
      The ID of the project
    • hashedPassword

      private String hashedPassword
  • Constructor Details

    • Student

      public Student(String studentID, String studentName, String email)
      Constructs a new Student object with the specified student ID and default password.
      Parameters:
      studentID - the ID of the student.
      studentName - the name of the student.
      email - the email of the student.
    • Student

      public Student(String studentID, String studentName, String email, String hashedPassword)
      Constructs a new Student object with the specified student ID and password.
      Parameters:
      studentID - the ID of the student.
      studentName - the name of the student.
      email - the email of the student.
      hashedPassword - the password of the student.
    • Student

      public Student(Map<String,String> informationMap)
      Constructs a new Student object with the specified student ID and password.
      Parameters:
      informationMap - the map
    • Student

      public Student()
      default constructor for Student class
  • Method Details

    • getUser

      public static User getUser(Map<String,String> informationMap)
      Creates a new Student object based on the information in the provided map. The map should contain the necessary information to construct the Student object, such as the student's name, email, and ID.
      Parameters:
      informationMap - a map containing the information required to create a new Student object
      Returns:
      a new Student object with the information provided in the map
    • getID

      public String getID()
      Gets the email of the user
      Specified by:
      getID in interface Model
      Specified by:
      getID in interface User
      Returns:
      the email of the user
    • getUserName

      public String getUserName()
      Gets the username of the user
      Specified by:
      getUserName in interface User
      Returns:
      the name of the user
    • getEmail

      public String getEmail()
      Gets the email of the user
      Specified by:
      getEmail in interface User
      Returns:
      the email of the user
    • getStatus

      public StudentStatus getStatus()
      Gets the status of the student
      Returns:
      the status of the student
    • setStatus

      public void setStatus(StudentStatus status)
      Sets the status of the student
      Parameters:
      status - the new status of the student
    • getSupervisorID

      public String getSupervisorID()
      Gets the ID of the supervisor
      Returns:
      the ID of the supervisor
    • setSupervisorID

      public void setSupervisorID(String supervisorID)
      Sets the ID of the supervisor
      Parameters:
      supervisorID - the ID of the supervisor
    • getProjectID

      public String getProjectID()
      Gets the ID of the project
      Returns:
      the ID of the project
    • setProjectID

      public void setProjectID(String projectID)
      Sets the ID of the project
      Parameters:
      projectID - the ID of the project
    • getHashedPassword

      public String getHashedPassword()
      getter for the password
      Specified by:
      getHashedPassword in interface User
      Returns:
      hashedPassword
    • setHashedPassword

      public void setHashedPassword(String hashedPassword)
      setter for the password
      Specified by:
      setHashedPassword in interface User
      Parameters:
      hashedPassword - the password that to be set