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

  Test a function hydroxide that takes a chemical formula

Write and test a function hydroxide that takes a chemical formula as a parameter and returns True if the chemical is a hydroxide (i.e. ends in OH).

  Write a program that computes the total sales tax

Write a program that computes the total sales tax on a $52 purchase. Assume the state sales tax is 4 percent and the states sales tax is 4 percent and the country sales tax is 2 percent;

  Where c is the temperature in degrees celsius

Write a program that takes as input a depth in kilometers inside the earth and displays the temperature at this depth in degrees Celsius and in degrees Fahrenheit.

  Simulate a multi-partitioned memory management system

Processes are also to be terminated by a GUI action. With each process change a free memory list status is to be output clearly showing the list items and their sizes.

  Two-dimensional array of double to hold the sales

Suppose you have a two-dimensional array of double to hold the sales amounts for all your salespeople three years. Assume you employ 50 salespeople and this array already holds valid data.

  Longest increasing subsequence problem

Write a computer program to solve the Longest Increasing Subsequence problem.Your program should read input from a text file (one value per line

  Write a program that allows users to enter a dollar amount

Write a program that allows users to enter a dollar amount for their bank account balance at the beginning of the month.

  Implement the readlog function

Implement the readLog function below, which is to (1) read the file, (2) populate a vector for each column, and (3) return the number of lines found.

  Calculate and display the number of units of electricity

The manager of PG&E wants a program that calculates a customer's electric bill. He will enter the current and previous meter readings.

  Write a program that keeps track of important birthdays

Write a program that keeps track of important birthdays. You can implement it with a one-dimensional array with enumeration type indices, a two-dimensional array, or with parallel arrays.

  Write a program that generates all the factors of a number

Write a program that generates all the factors of a number entered by the user. For instance, the number 12 has the factors 2 * 2 * 3.

  Write a recursive function

Write a recursive function, vowels, that returns the number of vowels in a string and write the definitions of the functions to overload the operators defined in parts a to c.

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