Class Accomodation
java.lang.Object
com.montytskyi.DormitoriesPlaces.Implementations.Accomodation
- All Implemented Interfaces:
Liveable
,StatusHaveable
The class which implements Liveable interface and represents an accomodation which can be rented by some client
-
Constructor Summary
ConstructorsConstructorDescriptionAm empty class constructorAccomodation
(int floor, int roomNumber) The constructor with parameter which identifies the room's coordinatesAccomodation
(int floor, int roomNumber, Status status) The constructor with all the parameters possible -
Method Summary
Modifier and TypeMethodDescriptionint
getFloor()
The getter method which return the floor numberint
The getter method which allows to receive the number of the roomThe getter method which is implemented from the interface and provides the ability to get the current accomodation statusvoid
setFloor
(int floor) The setter method which allows to set the floor of the roomvoid
setRoomNumber
(int roomNumber) The setter method which allows to set the number of the roomvoid
The setter method which is implemented from the interface and provides the ability to set the status
-
Constructor Details
-
Accomodation
The constructor with all the parameters possible- Parameters:
floor
- - integer value which represents the floor where the room is locatedroomNumber
- - integer value which represents the number of roomstatus
- - 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 locatedroomNumber
- - integer value which represents the number of room
-
Accomodation
public Accomodation()Am empty class constructor
-
-
Method Details
-
setStatus
The setter method which is implemented from the interface and provides the ability to set the status- Specified by:
setStatus
in interfaceStatusHaveable
- Parameters:
statusLabel
- - string which contains the current status of the accommodation
-
getStatus
The getter method which is implemented from the interface and provides the ability to get the current accomodation status- Specified by:
getStatus
in interfaceStatusHaveable
- 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
-