Class Accomodation

java.lang.Object
com.montytskyi.DormitoriesPlaces.Implementations.Accomodation
All Implemented Interfaces:
Liveable, StatusHaveable

public class Accomodation extends Object implements Liveable
The class which implements Liveable interface and represents an accomodation which can be rented by some client
  • Constructor Summary

    Constructors
    Constructor
    Description
    Am empty class constructor
    Accomodation(int floor, int roomNumber)
    The constructor with parameter which identifies the room's coordinates
    Accomodation(int floor, int roomNumber, Status status)
    The constructor with all the parameters possible
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The getter method which return the floor number
    int
    The getter method which allows to receive the number of the room
    The getter method which is implemented from the interface and provides the ability to get the current accomodation status
    void
    setFloor(int floor)
    The setter method which allows to set the floor of the room
    void
    setRoomNumber(int roomNumber)
    The setter method which allows to set the number of the room
    void
    setStatus(String statusLabel)
    The setter method which is implemented from the interface and provides the ability to set the status

    Methods inherited from class java.lang.Object

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

    • Accomodation

      public Accomodation(int floor, int roomNumber, Status status)
      The constructor with all the parameters possible
      Parameters:
      floor - - integer value which represents the floor where the room is located
      roomNumber - - integer value which represents the number of room
      status - - the value which represents the current status of an accommodation
    • Accomodation

      public Accomodation(int floor, int roomNumber)
      The constructor with parameter which identifies the room's coordinates
      Parameters:
      floor - - integer value which represents the floor where the room is located
      roomNumber - - integer value which represents the number of room
    • Accomodation

      public Accomodation()
      Am empty class constructor
  • Method Details

    • setStatus

      public void setStatus(String statusLabel)
      The setter method which is implemented from the interface and provides the ability to set the status
      Specified by:
      setStatus in interface StatusHaveable
      Parameters:
      statusLabel - - string which contains the current status of the accommodation
    • getStatus

      public Status getStatus()
      The getter method which is implemented from the interface and provides the ability to get the current accomodation status
      Specified by:
      getStatus in interface StatusHaveable
      Returns:
      status - the current status of an accommodation
    • getFloor

      public int getFloor()
      The getter method which return the floor number
      Returns:
      floor - the floor where the room is located
    • setFloor

      public void setFloor(int floor)
      The setter method which allows to set the floor of the room
      Parameters:
      floor - - the floor where the room is located
    • getRoomNumber

      public int getRoomNumber()
      The getter method which allows to receive the number of the room
      Returns:
      roomNumber - the value which contains the number of the room
    • setRoomNumber

      public void setRoomNumber(int roomNumber)
      The setter method which allows to set the number of the room
      Parameters:
      roomNumber - - the value which contains the number of the room