cpt :: list

In this project, you are asked to simulate airplane landing and takeoff at an airport. We will consider a small airport with only one runway. Because one runway is only available, planes can only form one line up. Planes landing or queuing to take off would join the line up at the north end of the runway. Once a plane arrives to the takeoff location at the south end of the runway, it would either takeoff or, if the plane has just landed, exit the queue towards a terminal located at the east end of the airport. Planes can exit or join the queue one at a time. Planes taking off would be asked to take off when reaching the take off location. Planes which have arrived do not need to request to leave the queue, they would be dequeued automatically. Therefore, only planes with a “take off” status can actually take off [R]. The Plane class needs to maintain data about particular Plane objects. This data only include a 3 digit flight number. The class Runway should create the queue in which planes land or take off.
Due date: Thursday June 10, 2021.

Sample Session

Landing [L] Take off [T] Ready [R]  Print [P]  Exit [exit]? 
L
Flight Number?
111

Landing [L] Take off [T] Ready [R]  Print [P]  Exit [exit]? 
L
Flight Number?
222

Landing [L] Take off [T] Ready [R]  Print [P]  Exit [exit]? 
T
Flight Number?
333

Landing [L] Take off [T] Ready [R]  Print [P]  Exit [exit]? 
T
Flight Number?
444

Landing [L] Take off [T] Ready [R]  Print [P]  Exit [exit]? 
R
Flight Number?
333

Landing [L] Take off [T] Ready [R]  Print [P]  Exit [exit]? 
P
444

Landing [L] Take off [T] Ready [R]  Print [P]  Exit [exit]? 
exit
>

Save project as: XXXXAirport.   

For evaluation check here