Reference no: EM132365525
Assignment
You are required to implement a basic Java program using Java Standard Edition 8.0 or higher. This assignment is designed to:
Practise your knowledge of design classes in Java
Practise the implementation of various kinds of classes in Java
Practise the use of polymorphism
Overview
NOTE: Carefully read this document. In addition, regularly follow the Canvas assignment discussion board for assignment related clarifications and discussion.
For this assignment you need to write a console application in the Java programming l anguage which allows a hotel named CityLodge to manage the renting and maintenance of two types of hotel rooms: standard hotel rooms and suites.
Implementation Requirements
Your Hiring Record class must meet the following requirements:
Override the public String toString() method to return a string containing the details of a hiring record in the following format:
recordId:rentDate:estimatedReturnDate:actualReturnDate:rentalFee:lateFee
(notice how the colon is used as a separator)
Implement a public String getDetails() method. This method should build a string and return that string. The returned string should be formatted in a human readable form as shown below. This method
MUST NOT do the actual printing to the console
Implementation requirements for all room classes (standard room and suite)
Each room must maintain its own collection of hiring records. These records store information about the 10 most recent times that room has been rented.
The following methods can be called on any object of type standard room or suite:
public boolean rent(String customerId, DateTime rentDate, int numOfRentDay)
public boolean returnRoom(DateTime returnDate)
public boolean performMaintenance()
public boolean completeMaintenance(DateTime completionDate)
public String toString()
public String getDetails()
Implementing the CityLodge application class
You are required to implement a class named CityLodge which contains a single collection to store up to 50 objects of both types standard room and suite. Objects of type standard room and suite will be added at runtime by the user of your program via Console input using a menu system described below.
Design Requirements
You must work out an object design for the above task. You should take advantage of object-oriented concepts such as composition, inheritance, method overriding, abstract classes, interfaces wherever appropriate.
Class hierarchies, relationships and components must be conceptualised in a relevant manner, based on the problem description and special conditions listed in this document. Furthermore, you must be able to explain how your program design will perform in certain scenarios and circumstances.
It may be necessary for your design to provide more functionality, such as accessors and mutators, than is specified in the above sections here for the mechanics of your design to work.
Attachment:- JAVA Programming.rar