Question: PLEASE NOTE THAT THIS HOMEWORK IS THREE PAGES AND WITH A TOTAL OF 10 POINTS. QUESTION 1: We need to design a hotel reservation system.

 PLEASE NOTE THAT THIS HOMEWORK IS THREE PAGES AND WITH A

TOTAL OF 10 POINTS. QUESTION 1: We need to design a hotel

PLEASE NOTE THAT THIS HOMEWORK IS THREE PAGES AND WITH A TOTAL OF 10 POINTS. QUESTION 1: We need to design a hotel reservation system. Write an implementation of the following classes 1. Room class that contains the following a. Private Data members i. Room id ii. number of beds iii. cost per day(cost_per_day) b. method members i. setter methods ii. getter methods iii. toString 2. Customer class a. Private Data members i. Full Name ii. Passport Id iii. Payment method iv. Email V. Mobile number vi. Birthdate vii. checkInDates viii. number of days(numDays) b. method members i. setter methods ii. getter methods 2020-2020 Faculty of Information Technology (FIT), Applied Science University, Amman, Jordan. 2 iii. validateEmail method: Check if email address valid or not. email must includes '@' and ':', and the place of '@' before the place of .' iv. toString 3. Hotel Class a. Private Data members i. Hotel id ii. Hotel name iii. Number of starts (NumStars) iv. Number of rooms which is constant (NumOfRooms) v. Number of Reserved room(numReservedRooms) vi. Array of objects of Room Class of size NumOfRooms(roomAr) vii. Array of objects of Customer Class of size NumOfRooms(customerAr) b. Method members i. Reserve room method: this method accepts 2 parameters object of room class, and object of customer class), and do the following a) Increase numReservedRooms by 1 email must includes '@' and '.', and the place of '@' before the place of '.' iv. toString 3. Hotel Class a. Private Data members i. Hotel id ii. Hotel name iii. Number of starts (NumStars) iv. Number of rooms which is constant (NumOfRooms) v. Number of Reserved room(numReservedRooms) vi. Array of objects of Room Class of size NumOfRooms(roomAr) vii. Array of objects of Customer Class of size NumOfRooms(customerAr) b. Method members i. Reserve room method: this method accepts 2 parameters object of room class, and object of customer class), and do the following a) Increase numReservedRooms by 1 b) Store room object in roomAr at numReservedRooms index, and customer object in custemorAr at numReservedRooms index. ii. Get room index: this method has one parameter which is a customer Passport Id, and return the index of this customer in custemorAr. iii. checkOut method: this method has one parameter which is index of room, and do the following, a) decrease numReservedRooms by one b) You will calculate the guest's bill by multiplying the number of days stayed by the cost per day. c) You will print the room number, guest name, days stayed, and the total cost to the screen. 4. The main method that does the following i. Create an object from Room class ii. Create an object from the customer class II 2020-2020 Faculty of Information Technology (FIT), Applied Science University, Amman, Jordan. 2 iii. Create an object of Hotel Class iv. Reserve room for customer_1 for 7 days, from date 1_1_2021 v. Reserve another room for customer_2 for 4 days, from date 15_1_2021 vi. Make check out for two customers and print out their total payment

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!