A program creates a queue. The program takes array of user names as String and then...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A program creates a queue. The program takes array of user names as String and then performs following operations: If the user name starts with A to S, it will add (enqueue) to the queue If the user name starts with T to Z, it will remove (dequeue) one element from the queue and then add both the user names to the queue. What will the queue look like if the input array is as follows? Please clearly label front and rear of the queue. ["Saeed", "Akram", "Jamal", "Tanveer", "Usman", "Ahmed", "Dawood", "Waheed"] Please run the ticket counter simulation code with following parameters: a. Number of customers per day = 200 b. Single Customer Service Time = 5 minutes c. A customer arrives in the system every 20 seconds How many cashiers are needed to keep the average customer wait time below 10 minutes? A theatre has two (2) cashiers at reception who are available at 8:00am. The customers start arriving in theatre at time 8:00am and a new customer arrives every 50 seconds. Customers go directly to the available cashier or wait in a queue for cashier availability. Every customer requires 4 minutes to be processed by a cashier. What will be the total time (including wait in the queue and processing time) for the sixth customer? Briefly explain why? A program creates a queue. The program takes array of user names as String and then performs following operations: If the user name starts with A to S, it will add (enqueue) to the queue If the user name starts with T to Z, it will remove (dequeue) one element from the queue and then add both the user names to the queue. What will the queue look like if the input array is as follows? Please clearly label front and rear of the queue. ["Saeed", "Akram", "Jamal", "Tanveer", "Usman", "Ahmed", "Dawood", "Waheed"] Please run the ticket counter simulation code with following parameters: a. Number of customers per day = 200 b. Single Customer Service Time = 5 minutes c. A customer arrives in the system every 20 seconds How many cashiers are needed to keep the average customer wait time below 10 minutes? A theatre has two (2) cashiers at reception who are available at 8:00am. The customers start arriving in theatre at time 8:00am and a new customer arrives every 50 seconds. Customers go directly to the available cashier or wait in a queue for cashier availability. Every customer requires 4 minutes to be processed by a cashier. What will be the total time (including wait in the queue and processing time) for the sixth customer? Briefly explain why?
Expert Answer:
Answer rating: 100% (QA)
1 include 2 include 3 include 4 using namespace std 5 6 7 8 9 10 11 12 13 14 ... View the full answer
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Posted Date:
Students also viewed these accounting questions
-
A movie theatre complex will raise its ticket price if the average ticket price of theatres in Southern California exceeds $7.50. A random sample of 36 theatres resulted in a mean of $7.80. The...
-
A customer service counter at a local bookstore is normally staffed by a single employee. The probabilities of arrival times and service times are shown in the following table: Simulate the arrival...
-
The average time (minutes) that a customer has to wait for the arrival of a cab after calling the company has been observed for random samples of size 4. The data for 20 such samples are shown in...
-
Poppins Company has the following: If 9,000 units are on hand at December 31, the cost of the ending inventory under FIFO is: (a) $99,000. (b) $108,000. (c) $113,000. (d) $117,000. Inventory, Jan. 1...
-
John Lindsay sells CDs that contain 25 software packages that perform a variety of financial functions, including net present value , internal rate of return, and other financial programs typically...
-
If the inverse demand function is p = 300 3Q, what is the marginal revenue function? Draw the demand and marginal revenue curves. At what quantities do the demand and marginal revenue lines hit the...
-
Determine if the following sequences are arithmetic sequences. Explain your reasoning. 1. \(\{4,7,10,13,16,19,22,25, \ldots\}\) 2. \(\{20,40,80,160,320,640\}\) 3....
-
Rauschenberg Manufacturing is investigating which locations would best position its new plant relative to three important customers (located in cities A, B, and C). As shown in the table below, all...
-
1. Consider the following information: Today: 20 July 2018 Next coupon payment date: 1 Sep 2018 Maturity Date: 1 Sep 2024 Yield: 6% (effective annual yield) Coupon 9.5% (annualized rate ...
-
Skulas, Inc., manufactures and sells snowboards. Skulas manufactures a single model, the Pipex. In the summer of 2014, Skulas management accountant gathered the following data to prepare budgets for...
-
Suponga que compr un terreno que cuesta $ 500,000 hoy. Debercontinuar pagando impuestos sobre la tierra, y la tasa es del 3% desu compra. Calcule el PV de su pago, usando una tasa de descuentod 1...
-
A credit union wants to make investments in the following: Type of Investment Annual rate of return(%) Vehicle loans 7 Consumer loans 9 Other secured loans ...
-
The marketing division of the Celestial Aerospace Company (CAP) has gone through two major reorganizations in the past seven years. Initially, the structure changed from a functional to a matrix...
-
Critically think through each set of questions and provide your answers below. 1. How can a patient benefit if the premiums paid are more than the cost of the medical care received? How can an...
-
es Feather Friends, Incorporated, distributes a high-quality wooden birdhouse that sells for $120 per unit. Variable expenses are $60.00 per unit, and fixed expenses total $180,000 per year. Its...
-
#include LiquidCrystal _ I 2 C . h command and LCD display will not be used Items for the circuit diagram to be created using Arduino Uno and the Wokwi website are as follows: 1 - Temperature...
-
As a child, Alex Baljeet was in an unfortunate car accident, which left him with a stutter. After growing up to the age of 20, Alex had learned to accommodate his stutter, when one night, during a...
-
You are maintaining a subsidiary ledger account for Police-Training Expenditures for 2013. The following columns are used: Inventory purchases are initially recorded as expenditures. Record the...
-
Prove that in the procedure GRAHAM-SCAN, points p 1 and p m must be vertices of CH (Q).
-
Show that for any finite set S, the power set 2 S has 2 |S| elements (that is, there are 2 |S| distinct subsets of S).
-
Show that after all edges are processed by CONNECTED-COMPONENTS, two vertices are in the same connected component if and only if they are in the same set.
-
The following trial balance has been extracted from the books of Patt plc as at 31 March 2010: Additional information: 1. Following the preparation of the above trial balance, the following...
-
What are three economic factors that influence what people buy?
-
What are at least five strategies followed by smart shoppers.
Study smarter with the SolutionInn App