The question asks:
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 need some help getting started here. This is what I have written so far, can anyone point me in the right direction on this one?
#include <iostream>
using namespace std;
class Airport
{
private:
string arrivals[4];
string newArrival;
public:
Airport();
void setArrival(string newArrival);
string getArrival();
bool isArrived(const Airport &airport);
bool isFull(const Airport &airport);
};
struct Airplane
{
string airline;
string city;
};
int main()
{
}