Project 1 : Incoming Flights Display Simulation


Due : 9.30am, 17 July

Design and write a program to simulate the operation of the incoming flights computer screen that is found at a typical small airport like the Roanoke Regional Airport.

The information that needs to be displayed about each flight is:

Basic Operation

Store the incoming flights in an array of structs. The display must show a fixed number of flights in a simple table where each flight corresponds to one line of the table (set this fixed number in a constant with a value of 5) and present the user with an interactive interface to change the list. The list of flights must be sorted in order of time so that the earliest expected flight is at the top of the list. The interactive interface can take the form of a list of options printed at the bottom of the flight list, followed by the user inputting a character and the system then acting upon that input (continued until the user explicitly chooses to quit). There must be options available to do each of the following:


Note that error-checking is optional and constitutes an easy way to earn creativity points for this assignment.

Batch input

When you load a file from disk the contents are read in as a stream of words. If the first word is "add", the rest of the line contains Airline, Flight, Origin, Minute, Hour, Day, Month, Year. If the first word is "delay" or "remove" the rest of the line contains Airline and Flight. Some typical lines from a batch file are display below:

remove SAA 601
add PanAm 411 Paris 0 10 5 7 2000
delay TWA 6202

Here are a sample set of batch files that can be executed in sequence: file1.txt file2.txt file3.txt.

Assumptions

You may make the following assumptions:

Sample Screen Display

Flight Arrivals

Airline    Flight From                 Time  Date  Status
-------    ------ ----                 ----  ----  ------
Delta      7248   Atlanta              08:10 07/04 OnTime
Mauritius  657    Mozambique           08:25 07/04 OnTime
Lufthansa  105    Frankfurt            20:12 07/04 OnTime
Virgin     212    Kingston             08:00 07/05 OnTime
PanAm      411    Paris                10:00 07/05 OnTime

Options: [A]dd Flight / [R]emove / [D]elay / [L]oad from disk / [Q]uit

Submission


Last updated : 7 July 2000 11.22am