Question
Build an implementation of a queue ADT. Use this implementation to build a simulation of waiting queuesat an airline check-in counter, organized as follows: There
Build an implementation of a queue ADT.
Use this implementation to build a simulation of waiting queuesat an airline check-in counter, organized as follows:
There are two types of passengers: first class and coach.
There are two service stations for first class and three forcoach.
There is a single queue for each type of passenger (first class,coach).
Passenger arrival times are random and are generated by a randomnumber generator.
Average arrival rates for passengers are R1 for first class andR2 for coach. These are decided at run-time by prompting theuser.
Service time is random and varies uniformly between 1 and S1 forfirst class, and between 1 and S2 for coach. Parameters S1 and S2are also determined at run-time, by prompting the user.
Whenever a service station is available and the correspondingqueue is not empty, we pick the passenger at the front of the queueand place her/him on the service station.
Whenever a first class service station is available and thefirst class queue is empty, the service station may service apassenger from coach.
The duration of the experiment, in minutes, is decided by theuser at run time.
Statistics generated by the simulation include: average servicetime, maximum service time, number served in each class, maximumqueue length for each type of passenger.
Step by Step Solution
3.50 Rating (163 Votes )
There are 3 Steps involved in it
Step: 1
Answer HI I Implemented this code in java languagePlease let me know if you have any issue Please r...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started