Develop a simple checkout system that system was so

Assignment Help Computer Engineering
Reference no: EM13348122

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:

<Customer ID>, <Arrival Time>, <Time to Check Out>, <Departure Time>, <Total Wait>, <Line Number>.

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.

Reference no: EM13348122

Questions Cloud

Question 1a major us automaker has evaluated that the city : question 1a major u.s. automaker has evaluated that the city mileage for one of its new suv models is normally
Create a powerpoint presentation about the marketing : create a powerpoint presentation about the marketing strategy for this relatively new product. your powerpoint
Part 1question 1 a dihybrid cross of two plants is : part 1question 1 a dihybrid cross of two plants is done and the seed pod shape is checked. the seed stock was
Suppose the conductor arrangement of a power line under : suppose the conductor arrangement of a power line under planning shown below. the line will connect the hydroelectric
Develop a simple checkout system that system was so : develop a simple checkout system. that system was so successful that theyve decided to expand their operations by
Develop a powerpoint presentation intended to introduce : develop a powerpoint presentation intended to introduce foreign dignitaries to actions of our federal reserve.address
Problem 1 explain your impression of the culture of an : problem 1. explain your impression of the culture of an organization or group to which you have belonged or for which
Q 1 lisa fitch from the human resources department at mit : q 1. lisa fitch from the human resources department at mit has telephoned you to report that the she cant access the
Questiona give an example of a cross site scripting xss : questiona give an example of a cross site scripting xss attack. include an explanation of the differences between

Reviews

Write a Review

Computer Engineering Questions & Answers

  Show the command line and accept one interger as input

Call a function the outputs seven sequential intergers, with input interger as the middle item on the command line below the input prompt.

  Why the program should consist of two files

When you input two strings representing your first and last names, have the program output your initials. The program should consist of two files, Initials.java and InitialsApp.java. Comment the code.

  Design a uml diagram for a grade class

Design a UML diagram for a Grade class with the following private data members.

  Calculating the average of 50 numbers

Write down a program which calculates the average of up to 50 numbers input by the user and stored in an array. The program must use a class named Statistics and have an AddNumber method which stores numbers into an array.

  Creating the c program

Write down a program which accepts a name for example, chocolate bluberries price per pound, and number of the pounds sold in average month .

  What technology characteristics should be evaluated

explain how Web services can be used to effectively integrate business applications and data. Search the Web for resources on current Web services such as XML, SOAP, UDDI and WSDL. Discuss how each is used, including examples from industry.

  What usually causes "illegal start of expression" errors

Does anyone have any ideas what usually causes "illegal start of expression" errors? Is there something the compiler is looking for in general? I am trying to debug a program and I keep getting this error. This error is before one of my public voi..

  Which loop arrangement be best for accessing an array

Which loop arrangement be best for accessing an array.

  Discuss body of literature that is used to motivate research

What is the main research problem addressed in the article? Summarize the research questions in a few sentences.

  Explain thread need to wait for faulting page in memory

Other user user threads belonging to the same process also be affected by the page fault - that is would they also have to wait for the faulting page to be brought into memory? Explain.

  Write dpwn an algorithm, using pseudo code

Write down an algorithm, using pseudo code, "Consensus algorithm": A group of ten people want to decide which one flavor of ice cream they will all order, out of three options.

  Benefits of ansi/tia/eia cabling standards

Discuss about the benefits of the ANSI/TIA/EIA cabling standards in detail and also explain why telecommunications managers must be familiar with them.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd