Question: 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
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
Get step-by-step solutions from verified subject matter experts
