Solved-You can only use iostream, cassert, cmath, cstdio, and cstdlib —- Homework 4- Solution

$30.00 $19.00

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,…

You’ll get a: . zip file solution

 

 
Categorys:
Tags:

Description

5/5 – (2 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:

    1. Constructor

    2. The basic functions (push, pop, size, top, empty)

    3. The big three (copy constructor, destructor, assignment operator)

  2. Write your own class of queue using Dynamic array with:

    1. Constructor

    2. The basic functions (push, pop, size, front, empty)

    3. The big three (copy constructor, destructor, assignment operator)

  3. Write your own class of priority queue using Dynamic array with:

    1. Constructor

    2. The basic functions (push, pop, size, top, empty)

    1. The big three (copy constructor, destructor, assignment operator) Note: Assume lower values have a higher priority.

  1. Write a class using two stacks of your stack class to simulate a queue and their basic functions (push, pop, size, front, empty).

  1. Write a class using two queues of your queue class to simulate a stack and their basic functions (push, pop, size, top, empty).