122: CS2 --- Assignment 5

Due Friday, June 2

Problem Description:

This program involves modifying the queue ADT class from the last assignment so that it is a template class. You will need to modify queue.h and queue.cpp accordingly. Test your queue template class with a modification of the simple client program testqueue.cpp from Program 4. Have the modified client program input objects of a certain type enqueueing them as they are input. Then dequeue the elements from the queue and display them in the order they are dequeued. This time prompt the user for the number of elements to be enqueued. Also, repeat this for the standard types int and float and for the user-defined class Rational (from Program 1).