Introduction
In this assignment you will nish building a simple simulation of an air trac control (ATC)
system.
In the rst assignment you implemented the core model for the ATC. In the second assignment
you will implement some of the more advanced logic to provide a very simple simulation for the
ATC.
In this assignment, aircraft queues will be introduced. There are two types of aircraft queue;
a landing queue and a takeo queue. Aircraft can be added or removed from queues. It is also
possible to check if an aircraft is in a queue, and to retrieve a list of all aircraft in the queue in
order.
A control tower was introduced in the rst assignment, but it had limited functionality. This
will now be expanded. A control tower can undertake actions such as trying to land or takeo
aircraft, and placing aircraft in queues. The functionality for nding unoccupied gates will also be
expanded from the rst assignment.
A control tower initialiser is also introduced in this assignment. The purpose of this is primarily
to load information from 4 data les (which store information about aircraft and their tasks,
terminals and gates, queues, and the number of ticks elapsed) into the ATC model when the
program starts. This information will allow the simulation to be run, and for aircraft to move
between various tasks.
Passenger and freight aircraft will now also have the ability to unload their passengers or cargo.
Multiple entities within the ATC now have the option to be encoded, and have hashcode and/or
equals methods.
A simple GUI has been provided to you as part of the provided code. It is in the towersim.display
package. It will not work until you have implemented the other parts of the assignment that it uses.
The GUI has been implemented using JavaFX and consists of three classes. View creates the
main window for the ATC GUI. AirportCanvas displays the structure of the airport. ViewModel
represents the ATC model that is to be displayed. The ATC application is initialised and started
by the Launcher class in the towersim package. It loads the tick, aircraft, queue, and terminals
and gates data and creates the GUI. Most of the GUI code has been provided to you.
In ViewModel you need to implement some of the logic that is executed by events in the simu-
lation when buttons are pressed, and to save information in the ATC model to data les.