CSc 21200  Homework 4 solution

$29.99

Original Work ?

Download Details:

  • Name: HW4-1.zip
  • Type: zip
  • Size: 62.35 KB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (3 votes)

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.
1. Write your own class of stack using Dynamic array with:
a. Constructor
b. The basic functions (push, pop, size, top, empty)
c. The big three (copy constructor, destructor, assignment operator)
2. Write your own class of queue using Dynamic array with:
a. Constructor
b. The basic functions (push, pop, size, front, empty)
c. The big three (copy constructor, destructor, assignment operator)
3. Write your own class of priority queue using Dynamic array with:
a. Constructor
b. The basic functions (push, pop, size, top, empty)
c. The big three (copy constructor, destructor, assignment operator)
Note: Assume lower values have a higher priority.
4. Write a class using two stacks of your stack class to simulate a queue and their basic
functions (push, pop, size, front, empty).
5. Write a class using two queues of your queue class to simulate a stack and their basic
functions (push, pop, size, top, empty).