Confidential Teaching Materials
Homework 6 Criteria, Page 1 of 15
Homework 6 Grading Criteria
Note: To receive any credit whatsoever, your answers must be legible and readily readable in the
judgment of the grader. Add brief explanatory comments as necessary to make sure your answers
are clear and unambiguous to the grader.
[p1] 100 points
Last week, you were asked to design a system to keep track of airline flights. Here is the problem description
again:
You have been hired by an airline to design a system to keep track of their flights. Each flight has the following
information associated with it:
* Flight number
* Date
* Time
* Plane number
* Originating City
* Destination City
* Passenger Information
Each passenger has the following information:
* Passenger ID number
* Name
* Frequent Flyer Number
* Seat Number
* Class (first class or coach)
You should store the flights as a binary search tree sorted on flight number; the passenger information should be
stored in a linked list within each flight node.
The airline wishes to be able to perform the following functions:
1. Add a flight – asks the user for information on a new flight and adds it to the binary search tree by flight
number. When the flight is first added to the tree, the passenger list should be set to nil.
2. Add a passenger to a flight – prompts the user for a flight number and passenger information, then adds
the passenger information to the appropriate flight.
3. Remove a passenger from a flight – given a passenger ID and a flight number, removes the given
passenger from the passenger list of the flight.
4. Cancel a flight – removes a given flight from the tree.
5. Print passenger list for a flight – prints out a list of all of the passengers for a given flight number
(entered by the user).
Using your design from last week, write all of the data structures, procedures, functions, and main algorithm to
implement this system. Your system should display a menu