Question: COEN 2 4 4 ( Summer 2 0 2 4 ) - Assignment # 2 Deadline: May 2 7 , Monday by 1 1 :

COEN 244(Summer 2024)- Assignment #2Deadline: May 27, Monday by 11:59PMWeight: This assignment is worth 5% of your final gradeIMPORTANT:- The assignment can be done individually or in groups of two.- If its done in a group, only a single copy of the assignment should besubmitted. The name and student ID of both members of a group must beincluded in each file.- For each class that you create you need to separate the specification of theclass from its implementation by using header files. Make sure that yousubmit with your answer both the .h and .cpp files for each class.- Compress the files using zip or other tools.- Submit the zip file on Moodle, download or check the size of the submittedfile to make sure that submission has occurred.- Donot wait the last minute to submit your assignment, because Moodlemay be overloaded and your submission may fail.- Assignments sent by email willnot be corrected.Key Considerations for the assignment: The quality of your software will also be evaluated. You must enforce encapsulation by keeping all data membersprivate. You need to make sure that your classes are well defined using the various concepts seen in the class. Each class should have default and regular constructor functions that initializes its data members. If needed copy constructor should also be provided. Objects should be created dynamically and must be deleted when no longer needed. There should be an output statement confirming the deletion of an object from the destructor function. Provide needed set/get functions for the data members. In the implementation of the member functions all the changed datastructures should be updated. Each class should be able to print the values of its data members. We have been asked to develop an information management system for room reservation in a hotel. Its assumed that reservations can be made for any period during a year. Each reservation request is for a single room. The checkin and checkout dates are in the same year. For example room reservation may be requested from 7/26/2024 to 8/3/2024. The duration of each month is assumed to be 30 days and the year 360 days. The availability of each hotel room during each day of a year is shown in a Boolean array, where true value means room is available for reservation on that day and false means it has already been booked for that day. The following table shows availability of a room during a year,Day no 1Availability True ..... True True False True True False .... FalseWe have identified the following classes and their data members for this system, ....154155156157158159....3601) Date class, month(int) day (int) year (int)2) Room class,// Each room is assigned a room number when its created, which has a nonzerovalue. roomNo (int) availabilityArray(Boolean)// Assume that when a room is// created, its available for the entire year3) Guest class,This class has been defined to request room reservation. guestName (string) checkinDate (Date) checkoutDate (Date),4) Reservation class,If room reservation is successful, an object of Reservation class will be created.Each reservation will be assigned a unique reservationNo generated by the counter data member. reservationNo cannot be zero. guest (Guest &) counter (static int) reservationNo (int) roomNo (int)5) ReservationManager class,Assume that the hotel has 100 rooms. This class has an array that stores Roomobjects and another array that stores pointers to the objects of Reservation class. roomArray (Room )// An array of objects of Room class. reservationArray( Reservation *)// An array of pointers that stores pointers to Reservation objects. Array size is 1000. noReservation // Number of reservation objectsThis class should have at least the following member functions,i) A function that receives a room reservation request through a Guest object. Guest has to be accommodated in the same room during his stay. If an available room is found then a reservation object is created and it calls to the insert function to store the reservation object in the reservationArray. Finally, this function returns reservationNo or zero if reservation wasnot successful.int makeReservation (Guest & guest)ii) A function that stores a pointer to the reservation object in theReservationArray. If ResevationArray is full it returns false.bool insert (Reservation & reservation)iii) A function that searches for a reservation object with the given reservationNo. If the object is found its data members are printed otherwise it prints not found.void search(int reservation)iv) A function that cancels a reservation with the given reservationNo,bool cancelReservation(int reservationNo)6) After implementing all the classes, write a driver program that demonstrates functionality of your program.- Creates an object of ReservationManager class.- Creates Guest objects and room reservation requests and process them. - Show outputs of execution of all the member functions of ReservationManager class.

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!