Question: c++ Write a program to simulate flight reservations. This includes designing three classes: FlightReservation, Flight, and Passenger. All class attributes must be private and accessed

c++

 c++ Write a program to simulate flight reservations. This includes designingthree classes: FlightReservation, Flight, and Passenger. All class attributes must be privateand accessed through public member functions. The attributes of each class aresummarized below: FlightReservation class has the following private attribute: vector flights;list of

Write a program to simulate flight reservations. This includes designing three classes: FlightReservation, Flight, and Passenger. All class attributes must be private and accessed through public member functions. The attributes of each class are summarized below: FlightReservation class has the following private attribute: vector flights;list of flights Flight class has the following private attributes: const long flightNum; // flight number which should be set / to the value of nextFlightNunm string departureAirport; departure airport string arrivalAirport; string flightDate; string flightTime const int flightCapacity; passenger capacity vector passengers; IIlist of passengers taking this flight static long nextFlightNum; initialize it to 100 and increment it by 10 l arrival airport flight date /l flight departure time /l as you create a new Flight object Passenger class has the following private attributes: string ID string firstName; string lastName int age string assistanceType; passenger ID /l passenger first name /l passenger last name // passenger age // special requests if any // for example: wheelchair, bassinet, child, none For each class, you need to write an appropriate constructor, and accessor and mutator functions as needed. The member functions for the FlightReservation class are summarized below (everything in blue is optional. If you implement it, you get extra credit) void FlightReservation:: ProcessTransactionFile(string fileName) This function opens the transaction file, named fileName and processes its lines one by one. Each line contains a specific command along with the required data. The commands and their formats are: " Create NewFlight flightDate flightTime flightCapacity AddPassengerReservation flightNum lastName IsFlightFull departureAirportarrivalAirport passengerlD firstName age assistance flightNum Write a program to simulate flight reservations. This includes designing three classes: FlightReservation, Flight, and Passenger. All class attributes must be private and accessed through public member functions. The attributes of each class are summarized below: FlightReservation class has the following private attribute: vector flights;list of flights Flight class has the following private attributes: const long flightNum; // flight number which should be set / to the value of nextFlightNunm string departureAirport; departure airport string arrivalAirport; string flightDate; string flightTime const int flightCapacity; passenger capacity vector passengers; IIlist of passengers taking this flight static long nextFlightNum; initialize it to 100 and increment it by 10 l arrival airport flight date /l flight departure time /l as you create a new Flight object Passenger class has the following private attributes: string ID string firstName; string lastName int age string assistanceType; passenger ID /l passenger first name /l passenger last name // passenger age // special requests if any // for example: wheelchair, bassinet, child, none For each class, you need to write an appropriate constructor, and accessor and mutator functions as needed. The member functions for the FlightReservation class are summarized below (everything in blue is optional. If you implement it, you get extra credit) void FlightReservation:: ProcessTransactionFile(string fileName) This function opens the transaction file, named fileName and processes its lines one by one. Each line contains a specific command along with the required data. The commands and their formats are: " Create NewFlight flightDate flightTime flightCapacity AddPassengerReservation flightNum lastName IsFlightFull departureAirportarrivalAirport passengerlD firstName age assistance flightNum

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!