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, 21.06.2019 22:30
Emily sold the following investments during the year: stock date purchased date sold sales price cost basis a. 1,000 shares dot com co. 03-21-2007 02-04-2018 $20,000 $5,000 b. 500 shares big box store 05-19-2017 01-22-2018 $8,200 $7,500 c. 300 shares lotta fun, inc. 10-02-2017 09-21-2018 $3,000 $4,500 d. 700 shares local gas co. 06-17-2017 11-11-2018 $14,000 $17,000 for each stock, calculate the amount and the nature of the gain or loss.
Answers: 3
question
Business, 22.06.2019 09:40
The wall street journal reported that walmart stores inc. is planning to lay off 2,300 employees at its sam's club warehouse unit. approximately half of the layoffs will be hourly employees (the wall street journal, january 25-26, 2014). suppose the following data represent the percentage of hourly employees laid off for 15 sam's club stores. 55 56 44 43 44 56 60 62 57 45 36 38 50 69 65 (a) compute the mean and median percentage of hourly employees being laid off at these stores. (b) compute the first and third quartiles. (c) compute the range and interquartile range. (d) compute the variance and standard deviation. (e) do the data contain any outliers? (f) based on the sample data, does it appear that walmart is meeting its goal for reducing the number of hourly employees?
Answers: 1
question
Business, 22.06.2019 11:20
Security a has a higher standard deviation of returns than security b. we would expect that: (i) security a would have a risk premium equal to security b. (ii) the likely range of returns for security a in any given year would be higher than the likely range of returns for security b. (iii) the sharpe ratio of a will be higher than the sharpe ratio of b. (a) i only (b) i and ii only (c) ii and iii only (d) i, ii and iii
Answers: 1
question
Business, 22.06.2019 11:40
Fanning company is considering the addition of a new product to its cosmetics line. the company has three distinctly different options: a skin cream, a bath oil, or a hair coloring gel. relevant information and budgeted annual income statements for each of the products follow. skin cream bath oil color gel budgeted sales in units (a) 110,000 190,000 70,000 expected sales price (b) $8 $4 $11 variable costs per unit (c) $2 $2 $7 income statements sales revenue (a × b) $880,000 $760,000 $770,000 variable costs (a × c) (220,000) (380,000) (490,000) contribution margin 660,000 380,000 280,000 fixed costs (432,000) (240,000) (76,000) net income $228,000 $140,000 $204,000 required: (a) determine the margin of safety as a percentage for each product. (b) prepare revised income statements for each product, assuming a 20 percent increase in the budgeted sales volume. (c) for each product, determine the percentage change in net income that results from the 20 percent increase in sales. (d) assuming that management is pessimistic and risk averse, which product should the company add to its cosmetics line? (e) assuming that management is optimistic and risk aggressive, which product should the company add to its cosmetics line?
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
English, 16.10.2019 21:00
question
Chemistry, 16.10.2019 21:00
question
Mathematics, 16.10.2019 21:00
Questions on the website: 13722367