Class Citizen

java.lang.Object
com.prog3.ipt.Model.CitizenClasses.User
com.prog3.ipt.Model.CitizenClasses.Citizen

public class Citizen extends User
Citizen is a class that extends User abstract class which represents a Citizen and his data registered into the system
  • Field Details

    • citizenID

      private String citizenID
    • registrationDate

      private LocalDate registrationDate
    • username

      private String username
  • Constructor Details

    • Citizen

      public Citizen(String citizenID, String name, String surname, LocalDate birthDate, String email, String password, String username)
      Citizen constructor
      Parameters:
      citizenID - Index which uniquely identifies a citizen
      name - Citizen name
      surname - Citizen surname
      birthDate - Citizen birthdate
      email - Citizen email which is used to register and login into the system
      password - Citizen password which is used to log into the system
      username - Citizen username which is used to log into the system
    • Citizen

      public Citizen(String name, String surname, LocalDate birthDate, String email, String password, String username)
      Citizen constructor
      Parameters:
      name - Citizen name
      surname - Citizen surname
      birthDate - Citizen birthdate
      email - Citizen email which is used to register and login into the system
      password - Citizen password which is used to log into the system
      username - Citizen username which is used to log into the system
  • Method Details

    • setCitizenID

      void setCitizenID(String citizenID)
    • setRegistrationDate

      void setRegistrationDate(LocalDate registrationDate)
    • setUsername

      void setUsername(String username)
    • getCitizenID

      public String getCitizenID()
    • getRegistrationDate

      public LocalDate getRegistrationDate()
    • getUsername

      public String getUsername()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class User
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class User
    • toString

      public String toString()
      Overrides:
      toString in class User