Class Administrator

java.lang.Object
com.montytskyi.Userables.Implementations.Administrator

public class Administrator extends Object
The class which represents the manager of the dormitory management systems
  • Constructor Summary

    Constructors
    Constructor
    Description
    An empty constructor of a class
    Administrator(String name, String surname)
    A constructor with all of the parameters possible which includes name and surname
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    A method which provides the administrator with an ability to cancel an existing rent of an existing user
    void
    A method which provides the administrator with an ability to edit an existing rent of an existing user
    A getter method of the class which allows to receive a name of the administrator
    A getter method of the class which allows to receive a surname of the specific administrator
    rentForUser(Liveable place, Userable renter)
    A method which provides the administrator an ability to make a new rent for an existing user
    void
    A setter method of the class which allows to set a name for the specific administrator
    void
    setSurname(String surname)
    A setter method of the class which allows to set a surname for the specific administrator

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Administrator

      public Administrator()
      An empty constructor of a class
    • Administrator

      public Administrator(String name, String surname)
      A constructor with all of the parameters possible which includes name and surname
      Parameters:
      name - - which represents the administrator's name
      surname - - which represents the administrator's surname
  • Method Details

    • rentForUser

      public Rentable rentForUser(Liveable place, Userable renter)
      A method which provides the administrator an ability to make a new rent for an existing user
      Parameters:
      place - - which will be rented by a specific user
      renter - - which is a user who rents a specific place
      Returns:
      Rentable, which represents a rent created by some user
    • cancelRentForUser

      public void cancelRentForUser(Rentable rent)
      A method which provides the administrator with an ability to cancel an existing rent of an existing user
      Parameters:
      rent - - represents a renting offer which recently was created by an user
    • editRentForUser

      public void editRentForUser(Rentable rent)
      A method which provides the administrator with an ability to edit an existing rent of an existing user
      Parameters:
      rent - - which represents an existing user's rent
    • getName

      public String getName()
      A getter method of the class which allows to receive a name of the administrator
      Returns:
      name, String value which contains the name of the administrator
    • setName

      public void setName(String name)
      A setter method of the class which allows to set a name for the specific administrator
      Parameters:
      name - - a name which will be set for the administrator
    • getSurname

      public String getSurname()
      A getter method of the class which allows to receive a surname of the specific administrator
      Returns:
      surname, the surname of the specific administrator
    • setSurname

      public void setSurname(String surname)
      A setter method of the class which allows to set a surname for the specific administrator
      Parameters:
      surname - - which contains the surname of an administrator