CSCI 230 -- Data Structures and Algorithms
Project 1 -- Object Oriented Airlines

 

September 16, 1999

Introduction

Submission Deadline: Wednesday, Oct 6 at 11:59:59 pm

Object Oriented Airlines (OOA) has finally decided to automate its flight scheduling. They want a new program and they are hiring you to write it for them. You'll have the rights to your new software and since you can sell it to other airlines, you need to make your program flexible.

OOA, or another airline, will provide you with a list of flights.
Each flight has the following properties: Each seating list has the following properties: Note: A particular class can have an arbitrary range of seats
(i.e. first class, 5 seats, seats 1, 5, 9, 11, 21).

Once the list of flights is given, you are ready to start scheduling passengers.
The scheduling must handle several operations.

S
chedule a passenger for a flight
Choose a flight number. Choose a class. If all the seats are full, give the option to put the passenger on a wait list. There should be a wait list for every class (first, business, and economy).
C
ancel a passenger from a flight
Choose a passenger. Choose a flight. If there are passengers on the wait list, print the name of the next passenger and give the option to schedule that passenger for the available seat.
P
assenger status: print the status of a passenger
Choose a passenger. If the passenger is scheduled for a flight, print the flight information. If the passenger is on a wait list, print the flight information and the passenger's position on the wait list.
F
light information: print the information for a flight
Print the departure airport, the departure date, the arrival airport, and a list of all the seats and the name of the passenger in each seat.

Design and Implementation

There are many ways this program could be implemented, many different data structures and algorithms that could be used, and many ways the project description could be extended and made more realistic. It will be interesting to think about these issues during the project and as we explore more sophisticated data structures. For now, however, try to keep it as simple as possible. Use the sequential container classes (lists, vectors, deques, stacks and queues) from the standard (STL) library where needed, and use the STL algorithms whenever you can.

Pay particular attention to the design of your classes. Here is an outline of classes you might have: The member functions defined for each of these class objects should support the above outlined scheduling operations. They should do so in such a way that the implementation details (the lists, queues, etc.) are hidden from the outside world. Start your programming task by determining which classes do what operations and then decide on the implementations within each class (some will be simple, others not).

Program synopsis and input format

The program will be run with the command-line
 
    airline.exe flights.txt
(You can set program arguments in Developer Studio using the Project->Settings menu, under the Debug tab.) After reading the flights from flights.txt (or whatever name is provided), the program should interactively query the user for input. All output should be to std::cout or std::cerr.

The format of flight.txt is as follows. Note: you can assume for every flight, there are seven lines. Input files will contain several flights.
 
101                 // Flight number
JFK                 // Departure airport
9 20 1999           // Departure date
LHA                 // Destination airport
1 2 3 4             // First class seat list
5 6 7 8             // Business class seat list
9 10 11 12 13 14 15 // Economy class seat list
700                 // Flight number
LGA                 // Departure airport
9 21 1999           // Departure date
PIT                 // Destination airport
1 2 3 4 17 18       // First class seat list
5 6 9 10 13 14      // Business class seat list
7 8 11 12 15 16     // Economy class seat list
.
.
.
The interactive queries will have the following formats. First the user should type one of the characters `S', `C', `P', `F' or `Q' (to quit). Small letters should be allowed as well so the program isn't case sensitive. The user prompts should be clear.

Notes and assumptions

Implementation environment

You can use any environment to develop your code. But your final submission must compile and run in the Visual C++ 6.0 environment.

Submission dates and guidelines

Submission Deadline: Wednesday, Oct 6 at 11:59:59 PM

Tenatively, projects will be submitted using the following guidelines: All implementation files must be copied to a common directory on RCS. The location will be determined soon. Inside this common directory, each student should create a subdirectory called username (where username is your RCS user name). The common directory will be designed so that only the TA's have read and execute permission. Student will have write permission to their directories only. After the submission deadline, the common directory will not be accessible. Students will be graded based on the content of their subdirectories. No exceptions will be made once access to the common directory is closed.

Grading criteria

The program grade will be grade 25% for successful compilation, 40% for correctness of the program, and 35% for program structure. Criteria for program correctness may be discerned from the foregoing description and will solely be based on the output from your program. Program structure includes class organization, member function design, code readability (indentation, variable names, etc.), and commentary. There should be comments describing the purpose of each class and the member functions and member variables. The comments about each class must also include a discussion of the flexibility of the class design and how well it will support future changes. Keep other comments, especially within the body of each function, short and concise. Avoid comments that just state in English what is obvious from the code. One bad example is
 
   i++;   //  increment i

Academic integrity

Students may discuss the program design, especially the design of the classes. Implementation of class member functions and the main program must be done individually. Sharing of code is expressly forbidden and will be detected by code comparison tools. Projects from all eight sections will be graded together by the TAs.

About this document ...

CSCI 230 -- Data Structures and Algorithms
Project 1 -- Object Oriented Airlines

This document was generated using the LaTeX2HTML translator Version 97.1 (release) (July 13th, 1997)

Copyright © 1993, 1994, 1995, 1996, 1997, Nikos Drakos, Computer Based Learning Unit, University of Leeds.

The command line arguments were:
latex2html -no_navigation -split 0 project1.tex.

The translation was initiated by Eric Breimer on 9/27/1999


Eric Breimer
9/27/1999