Program Four

Write a program that simulates the checkout line at a simple shop. This shop has a single cash register and a single cashier. Customers arrive in the line at random intervals, with a random number of items. They are checked out in the order that they arrive.

Begin by writing a queue class. This class should implement

Your implementation should be based on dynamic memory and pointers.

You should write a driver that tests your queue class.

Next write the simulation. We will write this simulation based on a time unit called a tick.

A customer can be described as follows: Customers arrive in line every 100 ticks based on the following table:
Number arriving in lineChance
0 15
1 48
2 32
3 5
The simulation should operate as following:

At each 100 ticks, you should print out the entire queue.

Each time the cashier services a customer, you should print out a message indicating this fact, the current time and they time that they will finish. You should also print out the customer information for the customer that is being checked out.

Please make sure that you use good programming practices, that your program is well documented, and takes advantage of modular compilation. Please make sure that your code is well structured and easy to read.

When you are finished, please create a web page containing links to your files as well as a tar file of the entire project. Make a README file that describes the project and any items of interest. Send an email message with the URL to this page to your instructor.