Eclipse JavaCityLodge:
CityLodge:
Room id:idR_;idS_R_108S_559
6
:(20)airconditioner,tv,Wifi,fridge,kettle
:CityLodge::
:CityLodge:
Hiring Records10Hiring Records:
Hiring Records:
Record id:id
roomId_ + customerId_ +(8:ddmmyyyy)
:id
Rent date:
date .javadate .java
Estimated return date:
:201971632019719
Actual return date:
Rental fee:
Late fee:
:
CityLodge:
:2;3;10
:5999199
()
:135%9999 = 135/100 * 99 = 133.65135%
CityLodge
CityLodge:
6
999
:1099
CityLodge:
110
210()
3
:2019715201972520197215CityLodge
Hiring Record class:
overridepublic String toString():
recordId:rentDate:estimatedReturnDate:actualReturnDate:rentalFee:lateFee()
1:hire RecordtoString:
R_108_CUS239_11072019:11/07/2019:16/07/2019:none:none:none(noneactualReturnDaterentalFeelateFee)
2:hire RecordtoString:
R_108_CUS239_11072019:11/07/2019:16/07/2019:16/07/2019:495.00:0.00
getDetails():
1:hire RecordgetDetails:
Record ID: R_108_CUS239_11072019
2:hire recordgetDetails:
2
()
10
:
(:)
public boolean rent (String customerId, DateTime rentDate, int numOfRentDay)
()
falsefalse
true
public boolean returnRoom(DateTime returnDate)
()
returnDatehirerentDatefalsefalse
5
true
public boolean performMaintenance()
()
falsefalse
true
public boolean completeMaintenance(DateTime completionDate)
()
completeMaintenancefalsefalse
roomtrue
public String toString()
:
roomId:numberOfBedrooms:roomtype:status:featureSummary
DD/MM/YYYY
roomId:numberOfBedrooms:roomtype:status:lastMaintenanceDate:featureSummary
(:)lastMaintenanceDate20
:
1:CityLodgeid R_108WifitoString:
R_108:2:Standard:Available:air conditioning, cable TV, Wifi, fridge, electric kettle
2:id S_55962019722suitetoString:
S_559:6:Suite:Rented:22/07/2019:large seating area, flat screen TV, outdoor balconies
public String getDetails()
10hire record:
1:()getDetails:
)
2:getDetails:
()
3:
(hiring record)
CityLodge
CityLodge50standard roomsuite
CityLodge classCityLodge:
:
Add Room
(CityLodge)id
idid
Rent Room
CityLodgeIDID:
1:
2:
1
Return Room
CityLodgeIDhiring recording
Room Maintence
CityLodgeID
:
CompleteMaintence
CityLodgeIDID
:
()
DisplayAllRooms
CityLodge10(hiring records)(:getDetails)
Start-up Class
startupCityLodgeCityLodge
50
Reviews
There are no reviews yet.