Question: in python Given a partial main.py and Plane Queue class in PlaneQueue.py, write the push() and pop() instance methods for Plane Queue. Then complete main.py

in python Given a partial main.py and Plane Queue class in PlaneQueue.py, write the push() and pop() instance methods for Plane Queue. Then complete main.py to read in whether flights are arriving or have landed at an airport.

  • An "arriving" flight is pushed onto the queue.
  • A "landed" flight is popped from the front of the queue.

Output the queue after each plane is pushed or popped. Entering -1 exits the program.

Click the orange triangle next to "Current file:" at the top of the editing window to view or edit the other files.

Note: Do not edit any existing code in the files. Type your code in the TODO sections of the files only. Modifying any existing code may result in failing the auto-graded tests.

Ex: If the input is:

arriving AA213 arriving DAL23 arriving UA628 landed -1 

the output is:

Air-traffic control queue Next to land: AA213 Air-traffic control queue Next to land: AA213 Arriving flights: DAL23 Air-traffic control queue Next to land: AA213 Arriving flights: DAL23 UA628 AA213 has landed. Air-traffic control queue Next to land: DAL23 Arriving flights: UA628

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!