Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Reservation Manager class (50 points] This class consists of the following members. All the properties have public getters and no setters. . ID : int
Reservation Manager class (50 points] This class consists of the following members. All the properties have public getters and no setters. . ID : int An int property to store ID of each Manager ReservationList : List This is property holds a list of Reservation objects that the Manager will help. Define the following constructors for this class: ReservationManager(int ID) This constructor will assign received ID parameters to the respective class property It will initialize the ReservationList with empty List by default. Page 3 of 6 It will then open and read file named "Manager_Reservation.txt" which is provided with this file. It will read one line at a time, and extract all the fields from the records. If the first field obtained from each file record matches Manager ID provided as parameter in constructor, create an object of Reservation class with the help of remaining fields obtained from file record. Add the created Reservation class object, to the ReservationList variable. Implement the following methods in the class: . void AddReservation (int id, string name, PassType type) this method will create an object of the Reservation class with the help of provided parameters and add the object to Reservation List. It should also print the newly created object values vold ShowAll() this method will display all the Reservation details for the current Manager. vold ShowAll(PassType type) this method will display all the Reservation details for the current Manager If Reservation's pass type matches with the parameter provided to this function
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started