Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/* Implement a java program to simulate an air traffic control using a linked list (only insertions). This air traffic control must control all flights

/* Implement a java program to simulate an air traffic control using a linked list (only insertions). This air traffic control must control all flights (takeoffs and landings) on a specific airway.

Takeoff: Insert a new node (flight)

Landing: Remove the specific node (next class exercise).

The program should ask for the following information:

- Flight number (e.g. NAX7091)

- Origin (e.g. El Paso, Texas)

- Destination (e.g. Los Angeles, California)

- Airline name (e.g. American Airlines)

- Departure (e.g. Mon 02:00PM)

- Arrival (e.g. Mon 05:00PM)

Modify Aircraft.java file to include the variables. Remember that the Aircraft class must have a next variable.

Using a for loop, insert at least 5 flights.

Implement the printAirTraffic method to print the airway traffic (linked list). */

class Main{

public static void main (String[] arg){

Aircraft airway = null; //This is the head (the airway)

airway = new Aircraft(); // Creates an empty airway

Aircraft flight = airway;

//your code goes here

printAirTraffic(airway);

}

public static void printAirTraffic(Aircraft airway){

//Implement this method

}

}

class Aircraft{

String flightNumber;

Aircraft next;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 19th International Conference Dexa 2008 Turin Italy September 2008 Proceedings Lncs 5181

Authors: Sourav S. Bhowmick ,Josef Kung ,Roland Wagner

2008th Edition

3540856536, 978-3540856535

More Books

Students also viewed these Databases questions

Question

8. Managers are not trained to be innovation leaders.

Answered: 1 week ago