Description
Name your implementation file as LastName(3 to 5 letters)_FirstNameInitial_HW4_QX.cpp Note: You can only use iostream, cassert, cmath, cstdio, and cstdlib.
All the following classes are to be implemented as template class.
-
Write your own class of stack using Dynamic array with:
-
Constructor
-
The basic functions (push, pop, size, top, empty)
-
The big three (copy constructor, destructor, assignment operator)
-
-
Write your own class of queue using Dynamic array with:
-
Constructor
-
The basic functions (push, pop, size, front, empty)
-
The big three (copy constructor, destructor, assignment operator)
-
-
Write your own class of priority queue using Dynamic array with:
-
Constructor
-
The basic functions (push, pop, size, top, empty)
-
-
-
The big three (copy constructor, destructor, assignment operator) Note: Assume lower values have a higher priority.
-
-
Write a class using two stacks of your stack class to simulate a queue and their basic functions (push, pop, size, front, empty).
-
Write a class using two queues of your queue class to simulate a stack and their basic functions (push, pop, size, top, empty).