Write a program to simulate lines in a grocery store

Assignment Help C/C++ Programming
Reference no: EM13802245

Part 1:

Write a program to simulate lines in a grocery store. We want to determine what line configuration is best.

You should implement the following configurations:

1 Cashier and 1 line

Multiple Cashiers and Multiple Lines (where the people always choose the line with the fewest amount of people)

Multiple Cashiers with 1 line (Think Barnes and Noble) Ask if you don't know what I mean.

The expected service time is 1 minute per customer, once it is their turn at the cashier.

Between zero and two customers join the line every minute.

Your algorithm should keep track of:

the total number of customers served
the combined total wait time of all customers
the maximum length of time any of these customers spent waiting in line

At the end of your program, you should produce a chart with the following information:

Time, Total Number of Customers Served, Average Wait, Longest Wait for each of the following time intervals:
30 minutes
60 minutes
120 minutes
480 minutes

Run your simulations at least a 100 times and determine which method is best.

Part 2: Add an expansion to your program that determines the results if you randomly assign expected service times between 1 and 4 minutes (use whole minutes)

Part 3: Add an expansion to your program that determines the expected service time by the number of items that the person has in their cart. Randomly assign a number of items to their cart. Determine if it is better to get in a line that has the fewest number of people or one that has the fewest amount of items in everyone's carts.

Reference no: EM13802245

Questions Cloud

Write a short story the decision : Write a short story of 1000 words on the topic "The Decision". You can use this as the title or create your own.
Define rulers over political structures throughout the world : Are we civilizing these nations, or making them conform to our beliefs. Has any nation appointed America as guardians or rulers over political structures throughout the world. How are we justified in our actions
Prepare a report showing the status of the marching band : You are the assistant to the band director for the Upper Saddle River Marching Band, and you must prepare a report showing the status of the marching band fundraising event for presentation to the board of trustees
Contrast the lesser included and greater included : Compare and contrast the "Lesser Included" and "Greater Included" Offenses. Distinguish between territorial jurisdiction vs. jurisdiction over the person and subject matter.
Write a program to simulate lines in a grocery store : Write a program to simulate lines in a grocery store. We want to determine what line configuration is best
Ethical decision making in business environment : Write an approximately 700-word review of the article. Your review should discuss how the SOX Act may affect ethical decision making in today's business environment, and the criminal penalties for which the act provides.
Discuss the remote connectivity needs for the system : Discuss the remote connectivity needs for the system. Identify the applications and hardware necessary to address the remote connectivity requirements
Explains how you will carry your argument : Explains how you will carry your argument. (This is generally a question you try to answer in your paper, though the thesis statement is not to be written in the form of a sentence.
Futures-margin and mark to market : The current price of gold is $1,800 an ounce, and the current futures price is 1,850 an ounce. Suppose you expect the price of gold to rise and you enter a long position into a future contract to buy gold. What is the amount that you must deposit (ei..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  An integer on this system is 4 bytes long

Assume the following for the program below. An integer on this system is 4 bytes long. The memory address where the array "a[]" was created begins at location 8000. a. #include

  Write a loop to total and average the contents of the array

Given the following code, write a loop to total and average the contents of the array.

  Implementation of matrix multiplication

Show the matrix product and implementation of matrix multiplication. Please show me all the working and provide the answer.

  Write a program to evaluate infix expressions

Write a program to evaluate infix expressions. An infix expression looks like the following:   9 * (5 - 4) + 2 / 6

  Write and test a c function named flow that returns both

fluid following in a pipe flows in a smooth pattern knows as laminar flow or a turbulent pattern know as turbulent

  The user enter the total rainfall for each of 12 months

Write a program that lets the user enter the total rainfall for each of 12 months (starting with January) into an array of doubles. The program should calculate and display:the total rainfall for the year,the average monthly rainfall,and the months w..

  Machine that i would like to know

Let's say I have a machine that I would like to know, on average, how much it runs throughout a given day through a percentage value. Every 30 seconds, I will have a device to record the current temperature of the machine. If the machine increases..

  Write a program using vectors and iterators

Create a program that uses at least two functions that will be called from your main. This program is a number game program that asks for parts of your phone and after manipulating it mathematically, eventually outputs your entire phone number. The d..

  Implement the program and find the item

This would be a function called into program. Struggling with the search aspect. Any clarification is greatly appreciated. File is 'inventory.dat'

  Write a gui application that prints out hello

Write a GUI application that prints out "Hello!" in either: English, French, or Spanish. When the user selects another language, the greeting shown in the greeting area should change. Your GUI should look like the interface shown below

  Describe the chemical symbol of one of the elements

Write a program that reads a single character describing the chemical symbol of one of the elements H, C, N, O, F and prints the full name of the element.

  The rpn calculator program

The RPN calculator program should read the RPN expression as an entire line from stdin.Input will consist of a single line. After completing the evaluation of the expression, the program should print the contents of the entire stack, starting with th..

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