Nerd Book Emporium | |
Assigned: Fri May 23, 2003 | Due: Fri Jun 6, 2003 |
Grade: 80 points |
The "new" concepts covered in this program are:
|
The renowned owner of the Nerd Book Emporium (NBE)
wants to analyze his staffing. He wants you to write a program to
simulate the time customers have to wait to checkout with their
items, nerd books.
Simulation Input Each simulation should query the user for the following input values that will guide your simulation:
Putting it all together... You are simulating the arrival of # customers being served by #cashiers. Customers arrive randomly from time 0 to the time period specified. Each customer is simulated to "buy" a random number of books determined using the #books per customer mean and standard deviation. Cashiers spend time per book * the customer's # books to checkout each customer's purchases. Customers get mad if they have to wait more than the angry customer limit. The results of the simulation run are sent to output file. Simulation Output The output of each simulation is:
Putting it all together for output this time... The run ends at simulation time after the last customer is served. Report stats including the average wait experienced by customers, the number of angry customers, and the percent angry customers. A simulation file detailing the interaction with each customer is also written. Implementation My implementation included the following classes:
The structure of my main() function looks like this:
I have provided code for you to generate random numbers for a uniform distribution (like rand()) and a normal distribution (for the # books per customer). It's called RNG and the files (RNG.h and RNG.cpp) are in the Common Area/prog05 folder. I will give more implementation hints next week. We'll talk a lot more about what simulate() does and STL specifics. As always, these are hints and not requirements.
|
Your program will be graded on three areas: design, quality, and function. Their description and weighting in your grade is given below. 1. Program Design (25%) It is essential to design your program before pounding it out in front of Visual C++. The design for this program requires:
You should include all the class interface files in your main() and be able to compile, but not build (or link) because your class member functions are not yet written. 2. Program quality (25%) I'm working on a more comprehensive style guide, but here's what I will be looking for:
3. Program function (50%) If your program doesn't compile or link, your grade for this section will automatically be cut in half and then I'll start from there. Please leave a README file in your prog01 folder with notes you want me to read. Good luck. |
As I mentioned in class, I will award 8 extra credit points for students that get "halfway" through this program by Friday May 30. I'll go over all this in more detail at class Wednesday, but "halfway" will definitely include:
If you do this, then you're basically left with the mechanics of the simulation of N customers using M cashiers. I will give you specific simulation runs that I want to see.
|