C++ Classes + Structs

Hi everyone,

I'm working on an assignment for school and I'm having some troubles on where / how to start it. I was hoping I could get some input and ideas on how to write this program:

Write and compile a C++ program that simulates the arrivals of airplanes at an airport.

- An airplane is represented using a C++ struct. Each plane belongs to an airline, such as United, and records the city from which it is arriving, for example Chicago.

- The airport is an ADT that holds all of the arrivals at the airport. These
arrivals are stored in an array.

- Boolean functions are needed to test whether or not there are any arrivals or if the arrivals terminal is full (4 airplanes).

- A function to add a new arrival to the airport is, of course, necessary.
This function places the next arriving plane at the end of the (unsorted) arrival array.

- Moreover, an initialization function that sets the arrival terminal to empty is required.

- Finally, create a boolean function to test if a particular airline from a specified city is currently sitting in the arrival terminal.


// So far, I have a class for the airport, with public structures (the 4 airplanes) inside of the class. I'm confused on where to go from there.. any guidance would be appreciated!
You will have to store the airplanes in an 'airplane' array, and the function to add a new arrival will add an airplane to the array.
Last edited on
Topic archived. No new replies allowed.