The program starts with a title as follows:
Version: 1.0
Term Project - Flight Management Program in C++
Produced by: Student Name
<<< Press Return to Continue>>>>
When the user presses return the program reads a file that contains the a Flight number (a combination of letters and numbers , for example WJ1145 stands for WestJet 1145), followed by the number of rows and the number of seats per row in an aircraft (for example 24 rows and 6 seats per row), and the rest of the file is filled with the passengers information, which includes: first name, last name, phone number, assigned seat ( for example 6A that stands for row number 6 and seat A), and the last field is an id number for each passenger. Here is the example of such a file:
WJ1145 24 6
Tom Harris 403-100-0000 6A 10000
Tim Moore 403-020-0000 5B 10001
Jim Li 403-003-0000 23C 10002
The data from this file must be read into an array of object of a class that you should develop and is called class Passenger. You have also the option of creating your own Linked List of Passenger objects, if you want. The other option is to use a C++ library class called vector. The last one (mean using vectors) is a preferred option as it is more powerful, easier to use, and saves you lots of time. For names and string types also preferred tool to use is C++ library class string instead of c-string. Which is much more powerful that primitive c-strings, and it is almost similar to String types that you learned in Processing, in ENGG 233. I will discuss these topics on Monday June 8, during the lecture time. However, the early birds who want to start working on the project should first read carefully two sets of slides, posted on D2L: 18_C++FileIO2020.pdf, and 19_vectors and string in C++ 2020
When reading the data from file you should save the data about each passenger’s seat inside another object of a class called Seat that is nested inside the class Passenger. Moreover, class Passenger should be part of another class called Flight.
Once the data from file is read into your program, your program should be able to:
Show the flight seat map on the screen
Show the passenger information on the screen
Add a new passenger to the list
Remove an existing passenger from the list
Save the passenger information from list back into the file