Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This must be answered in C++ with .h and .cpp files separated.Thank you! Here is the copy paste of TransactionFile.txt: CreateNewFlight SAN LAX 04/03/2016 8:30

This must be answered in C++ with .h and .cpp files separated.Thank you!

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Here is the copy paste of TransactionFile.txt:

CreateNewFlight SAN LAX 04/03/2016 8:30 9 CreateNewFlight SAN LAX 04/03/2016 9:30 15 CreateNewFlight SAN LAX 04/03/2016 11:00 50 CreateNewFlight SAN MDW 05/03/2016 8:30 50 CreateNewFlight SAN LAX 05/03/2016 8:30 10 PrintAllFlights AddPassengerReservation 100 AD7654 Suzy Walter 22 none AddPassengerReservation 110 DF1298 Joe Garcia 33 none AddPassengerReservation 100 FG7654 Amelia Perez 28 bassinet AddPassengerReservation 100 HG7656 Paul Didier 72 wheelchair AddPassengerReservation 100 AC9872 Bob Haynes 59 wheelchair AddPassengerReservation 100 AD7652 Suzy Walter 22 none AddPassengerReservation 100 AW2345 Tim Ducrest 43 none AddPassengerReservation 120 NN7655 Kevin Garcia 6 child AddPassengerReservation 130 HG7656 Paul Didier 72 wheelchair AddPassengerReservation 100 JH7321 Rose Hunter 41 none AddPassengerReservation 100 BH7676 Robert James 39 none AddPassengerReservation 100 BH5454 Mary Palmer 35 bassinet AddPassengerReservation 100 FG7654 Amelia Perez 28 bassinet AddPassengerReservation 100 DF6987 Julia Pompano 77 wheelchair AddPassengerReservation 100 FP0098 Fang Yi 32 none AddPassengerReservation 120 FP0098 Fang Yi 32 none AddPassengerReservation 100 FP3067 Suzy Walter 65 wheelchair AddPassengerReservation 150 FP3067 Suzy Walter 65 wheelchair AddPassengerReservation 110 FP3067 Suzy Walter 65 wheelchair PrintFlightInfo 100 PrintFlightPassengers 100 PrintFlightInfo 110 PrintFlightPassengers 110 PrintFlightPassengers 130 PrintFlightPassengers 140 PrintFlightInfo 150 isFlightFull 100 isFlightFull 130

PrintSpecificFlights SAN LAX 04/03/2016 PrintSpecificFlights SAN MDW 04/03/2016 PrintSpecificFlights SAN LAX 05/03/2016 PrintAssistancePassengers 100 wheelchair PrintAssistancePassengers 110 none PrintAssistancePassengers 100 bassinet PrintAssistancePassengers 150 wheelchair

CS211 - Assignment 2 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 -Flight flights; list of flights Flight class has the following private attributes const long flightNum; // flight number which should be set // to the value of nextFlightNum string departureAirport, departure airport string arivalAirport, string flightDate string flightTime; const int flightCapacity, passenger capacity vector passengers; I/ list of passengers taking this flight static long nextFlightNum; / initialize it to 100 and increment it by 10 // arrival airport // flight date // flight departure time II as you create a new Flight object Passenger class has the following private attributes string D; string firstName; string lastName int age, string assistanceType; // passenger ID // 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: CreateNewFlight flightDate flighfTime flightCapacity lastName IsFlightFull departureAirportarivalAirport Reservation flightNum passengeri age assistance

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

Step: 3

blur-text-image

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions