Class named Stack
Create a class named as Stack, which should have the following member functions:
· Push() method, single argument method, to add a character on top of a stack
· Pop() method, to remove and return a character from top of stack
· IsEmpty() method, to test whether the stack is empty or not
· IsFull() method, to test whether the stack is full or not
· Constructor functions, depending upon the need.
The class should have the following data members:
· Integer type variable, which indicates the position of top of stack, when empty it will be –1.
· Character array to hold the character added to the stack.
Using this class, write a main() which should accept a string form the user and display it in the reverse order.
What was the point of the little outburst of a class called Stack?