In this project, you will utilize the ADT queue to simulate a small airport. The airport has only one runway. In a unit of time, only one plane can land or take off, but not both. Planes are ready to land or take off at random times, so at any given unit of time, the runway may be idle or a plane may be landing or taking off. There may be several planes waiting either to land or to take off. For those planes that are landing, if a plane is low on fuel, it is given a higher priority than others.

You will need three queues to simulate the operation of the airport. Two queues are required for landing and the third one for take-off purposes.

It is better to keep a plane waiting on the ground than in the air, so a plane may only take off if there are no planes waiting to land. Therefore, at each appropriate unit of time, after receiving a request for another plane to land or take off, the simulation will first service the queues of planes waiting to land, and only if the landing queues are empty will it allow a plane to take off. For this simulation, it is assumed that the landing priority and the operation (i.e. landing or taking off) are generated randomly. Further, it is assumed that a landing operation requires three seconds and taking off requires two seconds. A request for landing or taking off is generated at an interval of every two units of time. You are required to generate the requests for the first 16 simulated seconds only. After that you will run your simulation until all the requests are completed.

Use a separate class to simulate the airport. Use a driver file to implement the class.

Your output should be in the form of a table, listing the time, the number of planes in each of the three queues at any given unit of time, and the current action taking place during that unit of time, if any. You should verify the result of your simulation by comparing it with hand calculated results.

See reverse side for sample output. See image.

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.