PA02 - Lab 7 -- Queue ADT
Items for this week
- Files are here
- Note: show7.cpp has been modified
- Implementation Testing Please Note that you are only to do the Linked List version of the Queue
- Programming Exercise 1 - Store Sim
- Note: change the seed for rand to 7
- Also, they left out the include line for
config.h (it is in test7.cpp, but not here)
Please add it (right after the ctime line).
- Note: the storesim.cs file is a shell
(of a program) that you shoudl rename
storesim.cpp and fill in
all the code.
- Programming Exercise 2 - putFront, getRear
- Programming Exercise 3 - getLength
- Code to throw an exception:
- dequeue:
if (isEmpty()) {
throw logic_error("dequeue() queue empty");
}
- getRear:
if (isEmpty()) {
throw logic_error("getRear() queue empty");
}