subject
Business, 01.07.2020 16:01 drandbone92

Suppose that a system to process requests has several queues, one for each customer service representative that is currently working. Each request has at least the following attributes: public class Request implements Comparable{ String description; String timestamp; ) where its compare to method compares requests based on their timestamp. The Queue class implements the usual enqueue (Request. item), dequeue (), get. Size(), and isEmpty() methods. Suppose that you have access to three queues initially declared as: Queue 91 = new QueueO; Queue 92 = new Queue(); Queue q3 = new Queue(); which represent the requests to be processed by three customer service representatives.
Suppose that one of the customer service representatives is no longer available, so the requests stored in 91, 92, and q3 must be divided as evenly as possible into two queues (p1, p2) according to their time stamps. Example: The following three queues: 91->("r9483","15;03"), ("r2532","13:55"), ("r8431","10:40") 92-> ("r3452","16:03"), ("r5234","14:05"), ("r1432","11:50") 93-> ("r3837","14:35"), ("r8742","13:10") are now divided into the following two queues: p1 -> ("r9483","15;03"), ("r5234","14:05"), ("r8742","13:10"), ("r8431","10:40") P2 -> ("r3452","16;03"), ("r3837","14:35"), ("r2532","13:55"), ("r1432","11:50") The way that this works is to move elements from the original queues to the destination ones alternating destinations, i. e. from the three dequeued elements from 91, 92, and q3, enqueue the one with the earliest time into queue p1, then from the three dequeued elements from 91, 92, and q3, enqueue the one with the earliest time into queue p2, then from the three dequeued elements from 91, 92, and q3, enqueue the one with the earliest time into queue p1, then back to p2, and keep repeating until 1, 42, and q3 are empty. Write java code to do this. Make sure to declare your queues p1 and p2.

ansver
Answers: 2

Another question on Business

question
Business, 22.06.2019 06:00
Josie just bought her first fish tank a 36 -gallon glass aquarium, which she’s been saving up for almost a year to buy. for josie, the fish tank is most likely what type of purchase
Answers: 1
question
Business, 22.06.2019 06:30
Select all that apply. what do opponents of minimum wage believe are the results of minimum wage? increases personal income results in job shortages causes unemployment raises prices of goods
Answers: 1
question
Business, 22.06.2019 11:30
(select all that apply) examples of email use that could be considered unethical include denying receiving an e-mail requesting that you work late forwarding a chain letter asking for donations to a good cause sending a quick message to your friend about last weekend sending your boss the monthly sales figures in an attachment setting up a meeting with your co-worker sharing a funny joke with other employees
Answers: 2
question
Business, 22.06.2019 11:50
After graduation, you plan to work for dynamo corporation for 12 years and then start your own business. you expect to save and deposit $7,500 a year for the first 6 years (t = 1 through t = 6) and $15,000 annually for the following 6 years (t = 7 through t = 12). the first deposit will be made a year from today. in addition, your grandfather just gave you a $32,500 graduation gift which you will deposit immediately (t = 0). if the account earns 9% compounded annually, how much will you have when you start your business 12 years from now?
Answers: 1
You know the right answer?
Suppose that a system to process requests has several queues, one for each customer service represen...
Questions
question
History, 28.05.2020 23:57
question
Mathematics, 28.05.2020 23:57
question
Mathematics, 28.05.2020 23:57
Questions on the website: 13722367