Assignment 1 – Grocery Store Simulation
Marking scheme posted!
Sample tests posted! (See the unit test file for details.)
Grocery stores often have a difficult task: they must determine how many employees to hire to staff checkout lines during varying levels of customers throughout the day. Too few open lines means customers spend time angrily waiting; too many, and the store loses money paying its employees. It’s also important to get the right mix of regular and express checkout lines, and perhaps even self-serve lines. Which combination is best depends on what kind of customers the store has.
In this assignment, you’ll build an event-driven simulation for a grocery store, which will model customers using different types of checkout lines. Your finished product will be able to set up the simulation with data from file inputs, simulate a sequence of events, and report timing statistics after the simulation is complete that will help determine how successful the checkout line set-up was for that set of customer arrivals.
Read through the following description carefully. Your overall task for this assignment will be to create a program which fulfills the requirements here.
The grocery store
Here we describe all the things that your simulation will keep track of. There are many other things that it won’t keep track of that might be important, such as which customers have children with them and how tired each cashier is, but are beyond the scope of the simulation.
Simulate only what we describe here.
A grocery store must keep track of all customers and checkout lines in the store, giving each customer a unique string identifier.
Customers go to a checkout line to pay for their items. The number of items influences how long it takes for the customer to check out, but what those items are does not, and so the simulation should only keep track of the number of items each customer has.