Class Booking
java.lang.Object
com.montytskyi.Bookings.Implementations.Booking
- All Implemented Interfaces:
Rentable
,StatusHaveable
The class which represents the booking in the dormitory. The class contains the info about the rented place, the person who rents it, the price and the current status
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe getter method that returns the renter who rents the placeThe getter method that returns the place rented by the userdouble
The getter method that returns the price for the rentThe getter method that returns the status of the current rentingvoid
setPrice
(double price) The setter method which allows to set the price for the rentvoid
The setter method to define the person who rents the placevoid
setRentPlace
(Liveable place) The setter method to define the place for rentingvoid
The setter method which allows to set the current status for the rent
-
Constructor Details
-
Booking
public Booking()The empty constructor -
Booking
-
Booking
The constructor with all the parameters possible- Parameters:
place
- - represents the place rented by the userrenter
- - the client who rents the placeprice
- - the price paid for the rentbookingStatus
- - the current status of the booking
-
-
Method Details
-
setRentPlace
The setter method to define the place for renting- Specified by:
setRentPlace
in interfaceRentable
- Parameters:
place
- - the place rented by the client
-
setRenter
-
setPrice
-
setStatus
The setter method which allows to set the current status for the rent- Specified by:
setStatus
in interfaceRentable
- Specified by:
setStatus
in interfaceStatusHaveable
- Parameters:
stringLabel
- - the label which contains the information about the status
-
getRentPlace
The getter method that returns the place rented by the user- Specified by:
getRentPlace
in interfaceRentable
- Returns:
- place - the place rented by the user
-
getRentPrice
public double getRentPrice()The getter method that returns the price for the rent- Specified by:
getRentPrice
in interfaceRentable
- Returns:
- price - the price for the rent
-
getRenter
-
getStatus
The getter method that returns the status of the current renting- Specified by:
getStatus
in interfaceRentable
- Specified by:
getStatus
in interfaceStatusHaveable
- Returns:
- bookingStatus - the current status of the renting
-