Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions