Java代写 | CSSE2002/7023 | Semester 1, 2021 Assignment 2

本次澳洲代写主要为java航空管控系统模拟的assignment

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.
The functionality you need to implement in ViewModel is to:
 ViewModel.getDroneAlertHandler().
De nes what happens when the “Drone Alert” button is clicked.
Declares a state of emergency on all terminals managed by the control tower.
 ViewModel.getDroneClearHandler().
De nes what happens when the “Clear Drone Alert” button is clicked.
Clears the state of emergency on all terminals managed by the control tower.
 ViewModel.getFindSuitableGateHandler().
De nes what happens when the “Find Gate for Selected Aircraft” button is clicked.
Updates information onscreen with the gate found for the currently selected aircraft.
 ViewModel.saveAs().
Saves the current state of the control tower simulation (which could then be loaded etc.).

Persistent Data & Loading Data from Files
Loading Data Files:
You need to implement loading the following from data les:
 The number of ticks elapsed.
The JavaDoc for the loadTick method in the ControlTowerInitialiser class describes
the format of a tick data file.
 Aircraft information.
The JavaDoc for the loadAircraft method in the ControlTowerInitialiser class
describes the format of an aircraft data le.
 Queue information.
The JavaDoc for the loadQueues method in the ControlTowerInitialiser class de-
scribes the format of a queue data file.
 Terminals and gates information.
The JavaDoc for the loadTerminalsWithGates method in the ControlTowerInitialiser
class describes the format of a terminals and gates data file.