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

  Principle ofsuperposition to determine that system is linear

Apply the principle of superposition to determine whether the following systems are linear. Sketch what the plot of the function looks like.

  Prompts the user to enter time in 12-hour notation

Write a program that prompts the user to enter time in 12-hour notation. The program then outputs the time in 24-hour notation. Your program must  contain  three  exception  classes

  Create a script that uses case logic

Display the command(s) used to do the following: display the cclontents of .bashrc file. Next, use the vi editor to edit that file and put in an alias so that you see a long file listing of a directory every time you type list.

  Write a c program that calculate the gross pay of employee

Write a C program that will calculate the gross pay of a set of employees. For each employee the program should prompt the user to enter the clock number, wage rate, and number of hours as shown below.

  A typical individual who commits who commits hate crimes

a typical individual who commits who commits hate crimes whether it is against or aimed at the gaylesbian community

  Implement function types that takes no input

Implement function types that takes no input, declares 3 variables of type char, 3 of type short, 3 of type int, and 3 of type double.

  State a c program that opens the file

Write a C program that opens the file and firstly stores all the values in an appropriately declared two-dimensional array of integers. It then should analyse this array to find (from the 40 input values) the total number of coursework marks in the..

  Wave steepness is the ratio of wave height

Wave steepness is the ratio of wave height (WH) to wave length(WL) and is an indicator of wave stability. When wave steepness exceeds a 1/7 ratio; the wave becomes unstable and begins to break. Assume a data file exits with the following header

  Bare in mind this is a program

Bare in mind this is a program with the audience being lawncare and landscaping people. So the events will generally be to know how often a client wants their lawn mowed.

  Computes the final price for a sales transaction

Create a C program that contains a function that computes the final price for a sales transaction and return that value to a calling method.

  Draws a single level for a "rogue­like" computer game

You will write a program that draws a single level for a "Rogue­like" computer game. The program will parse a line of input text from an input file (room.txt), use the parsed text to determine the shape of the room and its contents and then draw the ..

  Program that asks user to enter text and show given output

Write a program that asks the user to enter some text and then displays that text with all e's and E's replaced with 3's and all s's and S's replaced by 5's.

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