Package app.entity.user
Class User
java.lang.Object
app.entity.user.User
- All Implemented Interfaces:
ITaggedItem
The
User abstract class provides a basis for creating user objects with common attributes.
It implements the ITaggedItem interface.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEmail()Gets the email of the user.getID()Gets the ID of the user.getName()Gets the name of the user.Gets the password of the user.Gets the faculty of the user.voidSets the ID of the user.voidSets the name of the user.voidsetPassword(String password) Sets the password of the user.voidSets the faculty of the user.
-
Field Details
-
ID
The user's ID. -
name
The user's name. -
password
The user's password (default set to 'password'). -
school
The user's faculty.
-
-
Constructor Details
-
User
public User()Constructs a User object with default values. -
User
Constructs a User object with the specified ID, name, and faculty.- Parameters:
ID- The ID of the user.name- The name of the user.faculty- The faculty of the user.
-
-
Method Details
-
getName
Gets the name of the user.- Returns:
- The name of the user.
-
getID
Gets the ID of the user.- Specified by:
getIDin interfaceITaggedItem- Returns:
- The ID of the user.
-
setID
Sets the ID of the user.- Specified by:
setIDin interfaceITaggedItem- Parameters:
ID- The ID to be set.
-
setSchool
Sets the faculty of the user.- Parameters:
school- The faculty to be set.
-
getSchool
Gets the faculty of the user.- Returns:
- The faculty of the user.
-
getPassword
Gets the password of the user.- Returns:
- The password of the user.
-
getEmail
Gets the email of the user.- Returns:
- The email of the user.
-
setName
Sets the name of the user.- Parameters:
name- The name to be set.
-
setPassword
Sets the password of the user.- Parameters:
password- The password to be set.
-