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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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