Interface User
public interface User
Defines the common contract for all user types within the system (e.g., Applicant, Officer, Manager).
Specifies methods required to access and modify fundamental user attributes such as
user ID, name, hashed password, age, and marital status.
-
Method Summary
Modifier and TypeMethodDescriptionintgetAge()Gets the age of this user.Gets the securely hashed password for this user's account.Gets the marital status of this user.getName()Gets the name of this user.Gets the unique identifier for this user.voidsetAge(int age) Sets the age of this user.voidsetHashedPassoword(String hashedPassword) Sets the securely hashed password for this user's account.voidsetMaritalStatus(MaritalStatus maritalStatus) Sets the marital status of this user.voidSets the name of this user.voidSets the unique identifier for this user.
-
Method Details
-
getUserID
-
setUserID
Sets the unique identifier for this user.- Parameters:
userID- The user ID string to set.
-
getName
-
setName
Sets the name of this user.- Parameters:
name- The user's name string to set.
-
getHashedPassword
String getHashedPassword()Gets the securely hashed password for this user's account.- Returns:
- The Base64 encoded hashed password string.
-
setHashedPassoword
Sets the securely hashed password for this user's account. Note: There is a typo in the method name ("Passoword"). It should ideally be "setPassword" or "setHashedPassword".- Parameters:
hashedPassword- The Base64 encoded hashed password string to set.
-
getAge
int getAge()Gets the age of this user.- Returns:
- The user's age as an integer.
-
setAge
void setAge(int age) Sets the age of this user.- Parameters:
age- The user's age as an integer.
-
getMaritalStatus
MaritalStatus getMaritalStatus()Gets the marital status of this user.- Returns:
- The user's
MaritalStatus.
-
setMaritalStatus
Sets the marital status of this user.- Parameters:
maritalStatus- The user'sMaritalStatus.
-