Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The program should display a menu for the administrator to choose any of the following services (see the sample runs): - Adding a reservation: The

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

The program should display a menu for the administrator to choose any of the following services (see the sample runs): - Adding a reservation: The administrator asks the customer about the type of the reservation (conference, or room unit). Then he/she should perform the booking. The program will then display information about the reservation together with the total cost. Cost per night for a room unit or conference hall should be read from a file called bookingInfo which holds the pricing information for each unit type and then calculate total cost according to the rate and number of nights (look at section C ). - The administrator can also check for the existence of a specific reservation through its reservation ID and display the details of existing ones. - The administrator can also cancel any reservation through its reservation ID. - The administrator may display all available reservations with their total costs. - Once the administrator chooses to exit the application, the program should stop. Each line in the input file bookingInfo represents the pricing record of either a room unit or a conference hall as the following. Unit type : rate of decrement : night price Where rate of decrement represents the decrement rate in reservation total cost. For example, according to the information of file bookingInfo (fig 1), we can tell that for a reservation of a room unit for 3 nights, the total cost will be 71.19 according to the following equation. Room Total cost= (number of nights * night price)-[rate*( number of nights * night price)] room:0.3:33.9conference:0.5:190.5 Figure 1: Sample of bookingInfo file D.Some programming specifications: Provide the required classes for each type of reservation (room reservation, conference hall reservation) with suitable constructors, and accessors/mutators. All the reservations should be kept in one arrayList. You need to design your solution to include the following classes: - Reservation: Encapsulates common data and methods used to manage reservation of a single unit. - RoomReservation: Encapsulates data and/or methods specific to room reservation. - ConferenceReservation: Encapsulates data and/or methods specific to conference hall reservation - MusandamResort: Encapsulates data/methods to perform the actual management of the reservations including making a reservation, cancelling a reservation, reading the information from the input file, keeping track of current reservations, etc.). - ResortTester: Encapsulates the data and/or methods for displaying the menu and initiating the operations. The Reservation class and its descendant classes should override the toString method so that it can be used to display appropriate information of the related class according to the following - For room reservation, it will display (reservation ID, reservation type, number of nights, , cost of reservation, and list of requirements) - For conference hall reservation (reservation ID, reservation type, number of nights, cost of reservation, and number of guests) Your program should include at least the following methods - A method to add a new reservation. - A method to check an existing reservation. - A method to cancel an existing reservation. - A method to display all booked reservations. - A method to read file information and use it in further calculations. run

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Third International Conference Achids 2011 Daegu Korea April 2011 Proceedings Part 2 Lnai 6592

Authors: Ngoc Thanh Nguyen ,Chong-Gun Kim ,Adam Janiak

2011th Edition

3642200419, 978-3642200410

More Books

Students also viewed these Databases questions