
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Note:- First ready the whole

Transcribed Image Text:do an array-based implementation of a queue
Create a class ArrayQueuec T>
• default constructor
• isEmpty( )
• count( )
• peek( )
• dequeue( )
• enqueue( )
Create a class MCCAirport
• final double LANDING_TIME = 3;
• final double TAKE_OFF_TIME = 2;
• final double LANDING_RATE = 10;
• final double TAKE_OFF_RATE = 10;
• final int ITERATIONS = 1440;
//use a random generator
import java.util.Random;
Random generator = new Random(System.current TimeMillis( ));
Print out the following:
values should be 6 places to the right of the decimal
Average landing queue length:
|Average take off queue length:
Average landing queue time:
Average take off queue time:

Transcribed Image Text:Suppose that Middlesex County College Airport has one runway, which each
airplane takes landing Time minutes to land and takeOffTime minutes to take off,
and that on the average, takeOffRate planes take off and landingRate planes land
each hour.
Assume that the planes arrive at random instants of time. Delays make the
assumption of randomness quite reasonable.
There are 2 types of queues: a queue of airplanes waiting to land AND
a queue of airplanes waiting to take off.
Since it is more expensive to keep a plane airborne than to 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 Java program to simulate MCC Airport's operation. You might assume a
simulated clock that advances in one-minute intervals. For each minute, generate 2
random numbers: If the first is less than landingRate/60, a "landing arrival" has
occurred and is added to the landing queue; and if the second is less than
takeOffRate/60, a "takeoff arrival" has occurred and is added to the takeoff
queue.
Next, check whether the runway is free. If it is free, first check whether the
landing queue is nonempty, and if so, allow the first airplane to land; otherwise,
consider the takeoff queue.
Have the program calculate the average queue length and the average time that an
airplane spends in a queue. You should also consider 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 or take off is increased or decreased.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- 1. Write a Java program to implement the following: a. Display the menu which consists of list of "three choices". User has to select any one option from the list and the output should be displayed. b. In the first choice implement the concept of if-else c. In the second choice implement the concept of while loop using break statement d. In the third choice implement the concept of for loop Hint: a) Use switch statement b) Display menu should be like this: *** MENU *** 1. if-else 2. while loop using break 3. for looparrow_forwardAccumulating Totals in a Loop Summary In this lab, you add a loop and the statements that make up the loop body to a Java program that is provided. When completed, the program should calculate two totals: the number of left-handed people and the number of right-handed people in your class. Your loop should execute until the user enters the character X instead of L for left-handed or R for right-handed. The inputs for this program are as follows: R, R, R, L, L, L, R, L, R, R, L, X Variables have been declared for you, and the input and output statements have been written. Instructions Ensure the file named LeftOrRight.java is open. Write a loop and a loop body that allows you to calculate a total of left-handed and right-handed people in your class. Execute the program by clicking Run and using the data listed above and verify that the output is correct.arrow_forwardFill in the proper blank. JDB is used for finding and fixing ____ inside the Java program.arrow_forward
- Do not attempt, if you are using other's work. I'll give multiple dislikes for plagiarism and also will report your account. Give unique answer others are wrong. Question: Write a Java program that takes user input for two numbers, multiplies them, and prints the result. Ensure that your program is user-friendly, handling different data types, and providing meaningful output. Submission Guidelines: Use appropriate variable types for user input and the result. Implement input validation to handle unexpected user inputs. Print a clear and informative message along with the result.arrow_forwardJAVA ONLY, please read the full direction becuase there is a lot.arrow_forwardOne of the benefits of computers is that they can be programmed to do a specific task. Which of the following statements is correct?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education