Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

E) Define a class Reservation Manager with the following data members: 1/3 . . Variable maximum number of nights (max_no_of_nights) for the reservation (should be

image text in transcribed
E) Define a class Reservation Manager with the following data members: 1/3 . . Variable maximum number of nights (max_no_of_nights) for the reservation (should be equal to 7 (March 1 to March 8) for this case Variable number of rooms (no_of_rooms) which shows the total number of available Boms (it should be 20) An array of pointers to the Guests_Res_Request objects (Guest_Res_request arr) A two-dimensional (max_no_of_nights no_of_rooms) array of integers which is filled with the reservation ID when a reservation request is processes. (The array entries are initialized to 0 at the beginning). . + The following table shows an example of this two-dimensional array: Mara 1 2 3 4 5 6 7 8 9 10 11 11 1 101 10 10 Mar NAW 10 o aos 12 13 14 15 16 17 18 19 20 3 6 4 6 4 6 7 6 5 5 9 9 Mars NNNNN All the empty spots are filled by O At least the following additional functions should be provided: A Member function that processes a Gusts Ros_Request that is received as an input parameter. The reservation is successful, if the a room (with a specific number) is available for all the duration of the guests stay (number of nights). If the reservation is successful, this function returns the reservation ID and the new reservation ID is added to the corresponding elements in the two dimensional array, Also, the Gusts_Res_Request object should be added to the array of requests. If the reservation is not successful, it should be deleted from the array of request objects. If the reservation is not successful, the Custs_Res Request hiert be deleted from the array of

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

Step: 3

blur-text-image

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

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions

Question

Question 2 of 2

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago