Class User

java.lang.Object
app.entity.user.User
All Implemented Interfaces:
ITaggedItem
Direct Known Subclasses:
Staff, Student

public abstract class User extends Object implements ITaggedItem
The User abstract class provides a basis for creating user objects with common attributes. It implements the ITaggedItem interface.
  • Field Details

    • ID

      protected String ID
      The user's ID.
    • name

      protected String name
      The user's name.
    • password

      protected String password
      The user's password (default set to 'password').
    • school

      protected String school
      The user's faculty.
  • Constructor Details

    • User

      public User()
      Constructs a User object with default values.
    • User

      public User(String ID, String name, String faculty)
      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

      public String getName()
      Gets the name of the user.
      Returns:
      The name of the user.
    • getID

      public String getID()
      Gets the ID of the user.
      Specified by:
      getID in interface ITaggedItem
      Returns:
      The ID of the user.
    • setID

      public void setID(String ID)
      Sets the ID of the user.
      Specified by:
      setID in interface ITaggedItem
      Parameters:
      ID - The ID to be set.
    • setSchool

      public void setSchool(String school)
      Sets the faculty of the user.
      Parameters:
      school - The faculty to be set.
    • getSchool

      public String getSchool()
      Gets the faculty of the user.
      Returns:
      The faculty of the user.
    • getPassword

      public String getPassword()
      Gets the password of the user.
      Returns:
      The password of the user.
    • getEmail

      public String getEmail()
      Gets the email of the user.
      Returns:
      The email of the user.
    • setName

      public void setName(String name)
      Sets the name of the user.
      Parameters:
      name - The name to be set.
    • setPassword

      public void setPassword(String password)
      Sets the password of the user.
      Parameters:
      password - The password to be set.