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

  Design and implement a set of classes

Design and implement a set of classes that define various types of electronics equipment (computers, cell phones, pagers, digital cameras, etc).

  How to create a user named victor

design a user named VICTOR who can create tables, views, indexes, and can grant object privileges to other users on any object that he creates. Save your work as a .sql file.

  Write a java application that creates an instance

Write a Java application that creates an instance of the String class and initializes this instance with a String literal. Use a for loop structure to print the string in reverse order. Implement the following two String member methods to complete..

  Define what would adversary observe

(HW1) List some of the attacks on the Diffie-Hellman key exchange protocol we discussed in the lecture. Present your solution for avoiding such attacks.

  Why database re-engineering and redesign is required

define what should be done when adding tables and relationships for normalization.

  Hhf employees to recognize and avoid malware treats

give screenshots and an explanation of your results when you download, install, and run a security program such as Spybot - S&D.

  Explain the costs involved in the creation of the system

Describe the types of business needs that can be addressed using information technology-based solutions.

  Make an html page with a form for client

make a form using JavaScript that collects client body statistics and customer contact information for record keeping and marketing purposes.

  Relationship between mis and information technology

What is the relationship between management information systems and information technology (IT).

  What is the best process to prevent it

What is the best process to prevent it. What is your experience with Spam? How is spam affecting the Internet as a whole.

  Add a process addtext to the question class

Add a method addText to the Question class, and give a different implementation of ChoiceQuestion that calls addText rather than storing an array list of choices.

  How is this discipline organized or divided

What is the object(s) of study? What is this discipline about?

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