Question: please help with the reservation request and reservation manager part C++ k Jellyer reservation system of Via TUUL UND or more constructors, destructor and the



Jellyer reservation system of Via TUUL UND or more constructors, destructor and the necessary set and get functions for each class. Also, provide a print function for each class which outputs all the data members of that class. a) Define a class Date that has the following data members: month, day and year. b) Define a class Person with the folloving data members: The name of the person as a standard library string. The date of birth of the person (from part a). c) Define a class Passenger with the following data members: A Person object from part (b). An array that stores reservation request numbers. A passenger is allowed to book upto 5 future trips each being assigned a different request number. c) Define a Reservation Request class with the following data members, A Person object from part (b). An integer counter that generates reservation request numbers. An integer variable 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 to a data member. Travelling date from part (a). Starting station of the trip. Destination station of the trip. Number of seats requested by the person, which may be 1.4. Heading 1 Normal Strong Subtitle d) Define a class Reservation Manager with the following data members, Travel date. Variable capacity that specifies the number of seats in the train. Variable that specifies the number of stations on the route. A two-dimensional (capacity * number of stations) array of integers for reservation table, This array is initialized to zero, which indicates that all the seats are available. When a seat is assigned to a passenget, then the reservation request number is stored at the array locations corresponding to the travel except the destination station. An array of pointers to the reservation request objects, this array should be initialized to nullpointers, An array of pointers to the passengers, this array should be initialized to nullpointers. The following figure shows Montreal-Toronto route and station numbers. 1 2 3 The following table shows some example passenger reservations and the table below the filling of the reservation table. In the reservation table, request number isnot stored at the destination station of the trip. If multiple seats are requested for a reservation, reservation request number should be stored in all the seats. No of passengers Request no 145 146 147 148 150 Start Montreal Montreal Dorval Kingston Belleville Destination Brockville Toronto Kingston Toronto Toronto AaBbCcDdEx AaBbCcDc ABCD AaBbCdl Al A E SE: . Emphasis Heading 1 Normal Strong I TUSC VaUUNT LOUIC. TITUTO TOOI VUOTT LOUIC, TOYU TUTTUGI IBU BIROU OLGUSU station of the trip. If multiple seats are requested for a reservation, reservation request number should be stored in all the seats. Request no No of passengers 145 146 147 148 150 Start Montreal Montreal Dorval Kingstota Belleville Destination Brockville Toronto Kingston Toronto Toronto Brockville Kingston Toronto Seat no Montreal Dorval 145 146 147 Belleville 150 146 146 146 1 148 0 0 0 0 148 0 = = = UDUR Aa BbCcDc AaBbCcDdB AaBbCeDdl Aa Bbce Emphasis Heading 1 Normal Strong Subtitle Reservation Manager class should provide at least the following additional member functions, A member function that processes a reservation request received as a parameter. Reservation will be successful, jf seats are available for all the passengers in the group for the entire trip. If reservationis successful it should return reservation request number otherwise zero. If reservation is successful, reservation object should be inserted to the reservation request array. If reservation is successful, you should check if this passenger is on the passenger array, if not passenger should be stored in this array. The reservation number should be added to the passenger object A member function that receives a reservation request number as a parameter and outputs the details of the reservation including seat assignments. A member function that receives a reservation request number and cancels reservation request. A member function that receives a date object as a parameter and then deletes all reservation requests booked for that travel date. A member function that receives a passenger object and date object as parameters and deletes all the reservation requests of that passenger older than the given date. ) A main function that creates Person objects and Reservation Requests objects. It calls to the Reservation Manager member functions to process all Reservation Request tasks. au Considerations for the assignment: all data members private. Jellyer reservation system of Via TUUL UND or more constructors, destructor and the necessary set and get functions for each class. Also, provide a print function for each class which outputs all the data members of that class. a) Define a class Date that has the following data members: month, day and year. b) Define a class Person with the folloving data members: The name of the person as a standard library string. The date of birth of the person (from part a). c) Define a class Passenger with the following data members: A Person object from part (b). An array that stores reservation request numbers. A passenger is allowed to book upto 5 future trips each being assigned a different request number. c) Define a Reservation Request class with the following data members, A Person object from part (b). An integer counter that generates reservation request numbers. An integer variable 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 to a data member. Travelling date from part (a). Starting station of the trip. Destination station of the trip. Number of seats requested by the person, which may be 1.4. Heading 1 Normal Strong Subtitle d) Define a class Reservation Manager with the following data members, Travel date. Variable capacity that specifies the number of seats in the train. Variable that specifies the number of stations on the route. A two-dimensional (capacity * number of stations) array of integers for reservation table, This array is initialized to zero, which indicates that all the seats are available. When a seat is assigned to a passenget, then the reservation request number is stored at the array locations corresponding to the travel except the destination station. An array of pointers to the reservation request objects, this array should be initialized to nullpointers, An array of pointers to the passengers, this array should be initialized to nullpointers. The following figure shows Montreal-Toronto route and station numbers. 1 2 3 The following table shows some example passenger reservations and the table below the filling of the reservation table. In the reservation table, request number isnot stored at the destination station of the trip. If multiple seats are requested for a reservation, reservation request number should be stored in all the seats. No of passengers Request no 145 146 147 148 150 Start Montreal Montreal Dorval Kingston Belleville Destination Brockville Toronto Kingston Toronto Toronto AaBbCcDdEx AaBbCcDc ABCD AaBbCdl Al A E SE: . Emphasis Heading 1 Normal Strong I TUSC VaUUNT LOUIC. TITUTO TOOI VUOTT LOUIC, TOYU TUTTUGI IBU BIROU OLGUSU station of the trip. If multiple seats are requested for a reservation, reservation request number should be stored in all the seats. Request no No of passengers 145 146 147 148 150 Start Montreal Montreal Dorval Kingstota Belleville Destination Brockville Toronto Kingston Toronto Toronto Brockville Kingston Toronto Seat no Montreal Dorval 145 146 147 Belleville 150 146 146 146 1 148 0 0 0 0 148 0 = = = UDUR Aa BbCcDc AaBbCcDdB AaBbCeDdl Aa Bbce Emphasis Heading 1 Normal Strong Subtitle Reservation Manager class should provide at least the following additional member functions, A member function that processes a reservation request received as a parameter. Reservation will be successful, jf seats are available for all the passengers in the group for the entire trip. If reservationis successful it should return reservation request number otherwise zero. If reservation is successful, reservation object should be inserted to the reservation request array. If reservation is successful, you should check if this passenger is on the passenger array, if not passenger should be stored in this array. The reservation number should be added to the passenger object A member function that receives a reservation request number as a parameter and outputs the details of the reservation including seat assignments. A member function that receives a reservation request number and cancels reservation request. A member function that receives a date object as a parameter and then deletes all reservation requests booked for that travel date. A member function that receives a passenger object and date object as parameters and deletes all the reservation requests of that passenger older than the given date. ) A main function that creates Person objects and Reservation Requests objects. It calls to the Reservation Manager member functions to process all Reservation Request tasks. au Considerations for the assignment: all data members private
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
