Use C++ to create a hotel reservation system. For each class, include one or more constructors, destructor, set and get functions and a print function. Keep all data members private and Guests and...

Use C++ to create a hotel reservation system. For each class, include one or more constructors, destructor, set and get functions and a print function. Keep all data members private and Guests and Reservation Request objects should be created using dynamic memory allocation. Below are the classes: a) Define a class Date that has the following data members: month, day and year. b) Define a class Room that has the following data members: • Number of beds in the room, (one or two beds) . A two-dimensional 12-by-30 integer array that shows whether the room is available or has been booked for each day of the year. Each row of the array corresponds to a month and for simplicity we assume that the number of days in each month is 30. If the room is available on a given date then the corresponding array element has zero value and if it has been reserved then it has the value of reservation request number. • Room number. c) Define a class Guest with the following data members: • The name of the guest as a standard library string. . The date of birth of the guest (from part a). • Number of the room reserved to a guest. d) Define a Reservation Request class with the following data members, • A pointer to a Guest object from part (c). • An integer counter that generates reservation request numbers. • An integer as a reservation request number. The counter is incremented by one each time a reservation request object is created, then this value is assigned as the reservation request number. • Requested number of beds in the room. • Reservation date from part (a). • The check-in date from part (a). • The check-out date from part (a). e) Define a class Hotel Manager with the following data members, • A variable hotel_size that specifies the number of rooms in the hotel. • An array of pointers to the rooms in the hotel. • An array of pointers to the guests in the hotel. At least the following additional member functions should be provided, - A member function that processes a reservation request received as a parameter. Reservation will be successful, if a room with requested number of beds is available during the requested period. If reservation is successful, then it should return reservation request number otherwise zero. - A member function that receives a reservation request number as a parameter and outputs the details of the reservation. - A member function that receives a reservation request number and current date as parameters and cancels reservation request. - A member function that determines number of available single and double rooms on a given date. f) A main function that creates Hotel Manager, Guest and Reservation Requests objects. It calls to the Hotel Manager member functions to process all the Reservation Request tasks.
May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here