Package main.model.user
Class Student
java.lang.Object
main.model.user.Student
This class represents a student, which is a type of user.
It extends the User class and includes a student ID field.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionStudent()
default constructor for Student classConstructs a new Student object with the specified student ID and default password.Constructs a new Student object with the specified student ID and password.Constructs a new Student object with the specified student ID and password. -
Method Summary
Modifier and TypeMethodDescriptiongetEmail()
Gets the email of the usergetter for the passwordgetID()
Gets the email of the userGets the ID of the projectGets the status of the studentGets the ID of the supervisorstatic User
Creates a new Student object based on the information in the provided map.Gets the username of the uservoid
setHashedPassword
(String hashedPassword) setter for the passwordvoid
setProjectID
(String projectID) Sets the ID of the projectvoid
setStatus
(StudentStatus status) Sets the status of the studentvoid
setSupervisorID
(String supervisorID) Sets the ID of the supervisorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface main.model.user.User
checkUsername
-
Field Details
-
studentID
The ID of the student. -
studentName
The name of a student -
email
The email of a student -
status
The status of a student -
supervisorID
The ID of the supervisor -
projectID
The ID of the project -
hashedPassword
-
-
Constructor Details
-
Student
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
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
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
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
Gets the email of the user -
getUserName
Gets the username of the user- Specified by:
getUserName
in interfaceUser
- Returns:
- the name of the user
-
getEmail
Gets the email of the user -
getStatus
Gets the status of the student- Returns:
- the status of the student
-
setStatus
Sets the status of the student- Parameters:
status
- the new status of the student
-
getSupervisorID
Gets the ID of the supervisor- Returns:
- the ID of the supervisor
-
setSupervisorID
Sets the ID of the supervisor- Parameters:
supervisorID
- the ID of the supervisor
-
getProjectID
Gets the ID of the project- Returns:
- the ID of the project
-
setProjectID
Sets the ID of the project- Parameters:
projectID
- the ID of the project
-
getHashedPassword
getter for the password- Specified by:
getHashedPassword
in interfaceUser
- Returns:
- hashedPassword
-
setHashedPassword
setter for the password- Specified by:
setHashedPassword
in interfaceUser
- Parameters:
hashedPassword
- the password that to be set
-