Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Dynamic Stack Template Write your own version of a class template that will crea

ID: 3669396 • Letter: D

Question

Dynamic Stack Template

Write your own version of a class template that will create a dynamic stack of any data type. Be sure to include push, pop, and isEmpty methods.

The pop method should throw an exception if the stack is empty before attempting to remove the node from the list.

In addition, include a copy constructor and an overloaded assignment operator.

Demonstrate the class with a driver program. The program should ask the user to enter a string. The program then uses the stack to display the string in reverse order.

You may not use containers from the STL.

Place the class definition within it's own header file named MyStack.h.

A possible sample run:


> Hello, World!

!dlroW ,olleH

Has to be in c++

Explanation / Answer

second program reverce