Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Develop a simple checkout system. That system was so successful that they've decided to expand their operations by opening additional checkout lanes. Unfortunately, they are unsure of just how many lanes they need to add. Ideally, Cougar Mart would add enough lanes to satisfy expected demand. However, opening too many lanes would mean that they're paying checkers to staff empty lanes. Your goal is to develop a checkout lane simulation that can be used to determine the optimal number of lanes that Cougar Mart should have open.

Your program should simulate an entire day at Cougar Mart, in minutes. For this simulation, we will assume that Cougar Mart is open 12 hours a day. As this is a simulation, you don't actually need to run your program for 12 hours. Instead, consider the time span to be an integer, with each minute being a number. As such, 0 would indicate the start of the simulation, 1 would represent the first minute of the simulation, 2 the second minute, and so on.

Program Flow

Your simulation should operate as follows:

1. Prompt the user for the number of checkstands to simulate

2. Create a vector that contains the appropriate number of checkstands

3. Set the probability of a new customer arriving equal to 0.

4. For each minute in the simulation

a. Determine if a new customer has arrived.
i. Generate a random number between 0 and 5.
ii. If the random number is less than or equal to the probability of a new customer arriving (Step #3), go to Step 4.B.
iii. If the number is greater than the probability of a new customer arriving (Step #3), increment the probability of the new customer arriving by 1. Go to Step 4.C.

b. If a new customer has arrived, create a new customer whose arrival time is equal to the current simulation time and whose service time is a randomly generated number between 1 and 4. Next, try to find an empty checkstand. If one exists, place the customer in the line at that checkstand. If no empty checkstand exists, randomly select a checkstand for the customer to enter.

c. For each checkstand in the simulation:
i. If there is at least one customer in the checkstand, go to 4.C.II. Otherwise, go back to 4.C.
ii. If the first customer in line has not received a departure time, calculate one. Departure time = arrival time + service time.
iii. If the total time elapsed is greater than the first customer's departure time, then the customer has completed the checkout process. Remove them from the queue.
d. Increment the elapsed time in the simulation

5. After the simulation completes, write the results to a CSV file in the following format:

, ,

Also include the total number of customers generated during the simulation at the top of the CSV file. Note that an example CSV file will be included with this assignment description. I have provided a CsvWriter class to aid in the construction of CSV files.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9717739
  • Price:- $25

Priced at Now at $25, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Restaurant management database project the restaurant

Restaurant Management Database Project : The restaurant maintains the catalog for the list of food and beverage items that it provides. Apart from providing food facility at their own premises, the restaurant takes order ...

Question suppose that an attack would do 200000 in damage

Question : Suppose that an attack would do $200,000 in damage and has a 25% annual probability of success. Spending $15,000 per year on Countermeasure A would reduce the damage of a successful attack by 50%. a) Do a risk ...

Lucinda buys a new gaming system fornbsp500 she receives

Lucinda buys a new gaming system for? $500. She receives consumer surplus of? $175 from the purchase. How much does Lucinda value her GPS? system? Please provide the explanation

Construct a frequency distribution for the number of

Construct a frequency distribution for the number of different residences occu-pied by graduating seniors during their college career, namely 1, 4, 2, 3, 3, 1, 6, 7, 4, 3, 3, 9, 2, 4, 2, 2, 3, 2, 3, 4, 4, 2, 3, 3, 5

Java program that does the following please use simple

Java program that does the following: Please use simple computer syntax. More easy to understand! Use a while loop to prompt the user to enter 10 rain falls. Calculate and output the total and the average rain fall. Find ...

Please discuss the data hazards associated with pipelining

Please discuss the data hazards associated with pipelining with an example and how these hazards impact the performance gain associated with pipelining.

Suppose a record has the following fields in this order a

Suppose a record has the following fields in this order: A character string of length 15, an integer of 2 bytes, a SQL date, and a SQL time (no decimal point). How many bytes does the record take if: Fields can start at ...

Can someone please help me with this pleasetaskthe purpose

Can Someone please help me with this please: Task: The purpose of this assignment is to empirically measure attributes for binary search trees. Steps: Create a program that will build a binary search tree (BST) by adding ...

Question as you are reviewing the results of your various

Question : As you are reviewing the results of your various scans, what factors do you believe you would take into consideration when determining priority? The priority would be used to determine remediation efforts. So, ...

The formulas a rarr b and c and a rarr b and a rarr c are

The formulas A → (B ∧ C) and (A → B) ∧ (A → C) are logically equivalent. For this problem, you are going to prove that they are equivalent in two different ways. Prove that A → (B ∧ C) ≡ (A → B) ∧ (A → C) by writing two ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As