Question: 1. The stack implementations so far, using function overloading and function template, require the application to maintain the array and position pointer. These are bad

1. The stack implementations so far, using function overloading and function template, require the application to maintain the array and position pointer. These are bad implementations requiring the application to know and participate in the internal data and operations. Write a CH class to implement an integer stack, with the array and position pointer as its data members; push and pop as its member functions. The class shall be called Stack. Include a member function, call displayStack, to display the stack. Users of the Stack class shall specify the stack size. Do not dynamically grow nor shrink the size of the stack. Demonstrate the use of the Stack class in the main function. Do not use the C++ stack container nor class template. Must use appropriate comments. Put the program in a single.cpp file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
