Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1 files have also been provided below The Lab Java Files * List.java specifies the interface for a list using Generics and includes the

Part 1 files have also been provided below

image text in transcribed

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

The Lab Java Files * List.java specifies the interface for a list using Generics and includes the printBackwards method. QueueInterface.java is well defined interface for a Queue ADT Part1. Implement a List based Queue class. You will write the LinkedQueue.java class that implements Queuelnterface.java. Note that QueueInterface.java extends the Iterable interface., which means that you have to provide an iterator for it, similar to Assignment 1 The LinkedQueue implementation should be a doubly link list based one, based on the doubly link list you developed in Assignement 1 Part2. Using your LinkedQueue class. You will use the new LinkedQueue class to solve the following problem. Suppose that certain airport has one runway. Each airplane takes landingTime minutes to land and takeOffTime to take off, and that, on the average, planes arrive at random instants of time. (Delays make the assumption of randomness quite reasonable.) There are two types of queues: a queue of airplanes waiting to land, and a queue of airplanes waiting to takeoff. Because it is more expensive to keep a plane airborne than have one waiting on the ground, we assume that the airplanes in the landing queue have priority over those in the takeoff queue Write a program to simulate this airport's operation. You might assume a simulated clock that advances in five-minute interval. For each tic, generate two random numbers. If the first is less than landingRate, a "landing arrival" has occurred and is added to the landing queue; and if the second is less than takeoffRate, a "takeoff arrival" has occurred and is added to takeoff queue. In addition to simulating how queue get formed, and how planes get the authorization to land/takeoff, you program should calculate the average queue length and the average time that an airplane spends in a queue. You may also investigate the effect of varying arrival and departure rates to simulate the prime and slack times of day, or what happens if the amount of time to land and takeoff is increased or decreased. These variable parameters should be arguments to the program, and not hard coded You will need to use the LinkedQueue implementation you developed in part 1 The Lab Java Files * List.java specifies the interface for a list using Generics and includes the printBackwards method. QueueInterface.java is well defined interface for a Queue ADT Part1. Implement a List based Queue class. You will write the LinkedQueue.java class that implements Queuelnterface.java. Note that QueueInterface.java extends the Iterable interface., which means that you have to provide an iterator for it, similar to Assignment 1 The LinkedQueue implementation should be a doubly link list based one, based on the doubly link list you developed in Assignement 1 Part2. Using your LinkedQueue class. You will use the new LinkedQueue class to solve the following problem. Suppose that certain airport has one runway. Each airplane takes landingTime minutes to land and takeOffTime to take off, and that, on the average, planes arrive at random instants of time. (Delays make the assumption of randomness quite reasonable.) There are two types of queues: a queue of airplanes waiting to land, and a queue of airplanes waiting to takeoff. Because it is more expensive to keep a plane airborne than have one waiting on the ground, we assume that the airplanes in the landing queue have priority over those in the takeoff queue Write a program to simulate this airport's operation. You might assume a simulated clock that advances in five-minute interval. For each tic, generate two random numbers. If the first is less than landingRate, a "landing arrival" has occurred and is added to the landing queue; and if the second is less than takeoffRate, a "takeoff arrival" has occurred and is added to takeoff queue. In addition to simulating how queue get formed, and how planes get the authorization to land/takeoff, you program should calculate the average queue length and the average time that an airplane spends in a queue. You may also investigate the effect of varying arrival and departure rates to simulate the prime and slack times of day, or what happens if the amount of time to land and takeoff is increased or decreased. These variable parameters should be arguments to the program, and not hard coded You will need to use the LinkedQueue implementation you developed in

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

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

Am I prejudiced against this person? Am I too judgmental?

Answered: 1 week ago