Question: A hotel manager is looking for a Java programmer who can develop a reservation system that shall maintain information about the hotel guests and can

 A hotel manager is looking for a Java programmer who can

A hotel manager is looking for a Java programmer who can develop a reservation system that shall maintain information about the hotel guests and can manage the reservation of hotel rooms To solve this problem you are required to do the following Create a java class " reservation" that has data members: guestName "String", passportNo"String" CheckinDay "int" , CheckinMonth "int", CheckinTime"int" , CheckOutDay "int", CheckOutMonth"int , and CheckOutTime"int"pricePerNight "double" ,membership "boolean" ,and noofRooms int-150". (0.5 Mark) 1. 2. Create a method setAll), that shall fill all of the class data members except the number of rooms 0.5 Mark) 3. Create a method calculateNights), this method shall return the number of nights that the guest spent in the hotel, knowing that the hotel night calculated from 15:00pm to 12:00PM of the next da For example: A guest wants to reserve a room for 1 night and he/she is planning to do check in at 3 morning, is this case he/she has to do the check out at 12noon of the same day (2 Marks) 4. Create a method invoice).This method shall return the room total price after calculating the numb of nights in addition to the 10% hotel tax and 10% service charge that are included. Also, the guest is eligible for a 10% discount he/she has a membership with the hotel .(2 Marks) 5. Create a static method bookRoom). This method shall return the number of available hotel rooms Each time a guest makes reservation, the hotel number of rooms shall be decrease by one Consider that the hotel has 150 room available.(1 Mark) 6. Create a method printinvoice(), this method shall return: (2 Marks) -Guest name. -Passport number. Check-in date/time - Check-out date/time. Number of nights. Total price in details. 7. Write a main program to test your class.(0.5 Mark) 8. Declare objects guest1 and guest2 and fill the objects data from the keyboard. (0.5 Mark) 9. Print out the number of available hotel rooms.(0.5 Mark) 10. Print the invoice of the guest2 in a nice format.(0.5 Mark

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!