(Solved) : Java Help Assume Hypothetical Queuing System 3 Queues Queue Queue B Queue C Travelers Wait Q37758807 . . .

Java help:

Assume that we have a hypothetical queuing system that has 3queues: Queue-A, Queue-B, Queue-C, in which travelers are waitingto be cleared for their flights. Each queue has an inspector and wecall him/her Checker. Queue-A has an inspector named CheckerA.Similarly, Queue-B and Queue-C has inspectors named Checker-B andChecker-C respectively. Each checker is responsible for processinghis/her queue. A checker will be busy for a certain amount of timesomewhere between 1 min to 15 mins in order to process a person’scredentials. You can use a random generator to simulate thechecker’s time.

Effectively, a person has to go though two queues, eitherthrough Queues A, C or Queues B, C.

From time to time the checkers themselves peek in theirrespective queues to find the length of their queues. If they findthat their queue length is increasing steadily then they willexpedite their processing. You need to come up with a policy (or aset of policies) that these TSA checkers will use to manage theirqueues effectively. Initially you start the simulation with apopulation of say N (e.g., 50) people who want to be checked in sothat they can board their flights. Make sure that N people areassigned to different queues at different times somewhere between 1min to 10 minutes.

For example, say a person P1 arrives at Queue-A at time t[1]=0.The next person, say P2, arrives at Queue-B at t[2]=2.1 seconds(i.e., 2.1 secs later). The third person, say P3, arrives atQueue-B at t[3]=3.8 minutes later after P2. People arrive atdifferent times but never together. How you distribute 50 peopleacross different queues is up to you.

For example, Queue-A can have max capacity of 30, and Queue-Bhas 20. It is up to you how you set up the initial distribution ofpeople. Afterwards, you can alter the input capacities to say 11persons going to Queue A and 39 people going to the Queue B.Different initial distributions become your different test cases.The program ends when all 50 people have been processed. Computethe total time when all persons have been processed through boththe queues. You should use all the methods that you find in Javacollection’s queue interface. You can also useSystem.currentMilliSecs() to the get current time from system tosimulate time, and other collection objects in your program innecessary. The goal of program is to simulate this queuing systemas best as you can.


Expert Answer

Answer to Java help: Assume that we have a hypothetical queuing system that has 3 queues: Queue-A, Queue-B, Queue-C, in which trav…