CS 112
Homework 7
Due: Wednesday 4/3/2001 by 12:00 a.m.


The Problem, general description

Your task is to write a program to manage a queue and apply it to design a simulation of a real-life system where waiting is involved (a bank teller queue).
The Queue data structure has the basic queue operations In and Out, Full and Empty and has to be implemented as a C++ class. The queue implementation is circular.
The application is described in a separate handout which was given to you in class on Thursday.

Details

Your program should be developed in two stages. You will submit twice, once for each stage.

In stage 1, you implement and test the queue data stucture. You provide a testdriver, test it thoroughly and submit a typescript to document this. For this part, you will submit 5 files (Queue.cpp, Queue.h, testQ.cpp, Makefile and typescript) in Hw7A.

In stage 2, you implement the simulator, which is described and partially implemented in the handout. The code in the handout is not complete, is done in C and does not rely on the queue as you implemented it. Your task is to modify that program, based on good software engineering principles (such as code reuse) and turn it into a C++ program which: The simulator is part of a separate class called Bank, which has three class variables (closing time, number of customers, number of tellers) and several class functions, one of which is Simulate.

For this part, you will submit in Hw7B 7 files: Queue.h, Queue.o (compiled when you tested the queue at stage 1), Bank.h, Bank.cpp and testBank.cpp, plus a Makefile and a typescript.


Ileana Streinu