Package main.model.user
Class Supervisor
java.lang.Object
main.model.user.Supervisor
This class represents a supervisor, which is a type of user.
It extends the User class and includes a supervisor ID field.
-
Field Summary
-
Constructor Summary
ConstructorDescriptiondefault constructor for Supervisor classSupervisor
(String supervisorID, String supervisorName, String email) Constructs a new Supervisor object with the specified supervisor ID.Supervisor
(String supervisorID, String supervisorName, String email, String hashedPassword) Constructs a new Supervisor object with the specified supervisor ID and password.Supervisor
(Map<String, String> map) Constructs a new Supervisor object from a map -
Method Summary
Modifier and TypeMethodDescriptiongetEmail()
Gets the email of the userGets the hashed password of the usergetID()
Gets the user ID of the user.static User
Gets the usernamevoid
setHashedPassword
(String hashedPassword) Sets the hashed password of the userMethods 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
-
supervisorID
The ID of the supervisor. -
supervisorName
The name of the supervisor -
email
The email of a supervisor -
hashedPassword
-
-
Constructor Details
-
Supervisor
Constructs a new Supervisor object with the specified supervisor ID.- Parameters:
supervisorID
- the ID of the supervisor.supervisorName
- the name of the supervisor.email
- the email of the supervisor.
-
Supervisor
Constructs a new Supervisor object with the specified supervisor ID and password.- Parameters:
supervisorID
- the ID of the supervisor.supervisorName
- the name of the supervisor.email
- the email of the supervisor.hashedPassword
- the password of the supervisor.
-
Supervisor
Constructs a new Supervisor object from a map- Parameters:
map
- the map
-
Supervisor
public Supervisor()default constructor for Supervisor class
-
-
Method Details
-
getUser
-
getID
Gets the user ID of the user. -
getUserName
Gets the username- Specified by:
getUserName
in interfaceUser
- Returns:
- the name of the user
-
getHashedPassword
Gets the hashed password of the user- Specified by:
getHashedPassword
in interfaceUser
- Returns:
- the hashed password of the user
-
setHashedPassword
Sets the hashed password of the user- Specified by:
setHashedPassword
in interfaceUser
- Parameters:
hashedPassword
- the hashed password of the user
-
getEmail
Gets the email of the user
-