Help with a program involving structures and classes

Can someone help me get started with this program?

Write and compile a C++ program that simulates the arrivals of airplanes at Regina 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.

Test your program using the script given below (code this in the main function), namely

Initialize arrival terminal to empty
If there are any arrivals, print that there are some arrivals; otherwise, print that there are no arrivals yet
Add a new WestJet airplane from Calgary
Add a new United airplane from Chicago
If there are any arrivals, print that there are some arrivals; otherwise, print that there are no arrivals yet
If the arrival terminal is full, print that it is full; otherwise, print that it is not full
If there is an Air Canada plane from Toronto, print that it has arrived; otherwise, print that it has not yet arrived Add a new Air Canada airplane from Toronto
Add a new Delta airplane from Minneapolis
If the arrival terminal is full, print that it is full; otherwise, print that it is not full
If there is an Air Canada plane from Toronto, print that it has arrived; otherwise, print that it has not yet arrived


I will post what I have so far when I get home.
Last edited on
Did the professor say why a struct was used instead of a class?
Topic archived. No new replies allowed.