|
Assignment 3 |
The version of the CharStack class that appears on the Programs page uses a statically allocated array to hold stack items. Please create a new version of the class that uses dynamic memory management to allocate the array. Besides modifying the member variables and member functions that are already there, you will need to add a copy constructor, a destructor, and an overloaded assignment operator. Also, design the class so that if an attempt is made to push onto a full stack, the array stack is automatically resized.
A program called testCharStack.cpp is available for testing your implementation.
In one e-mail message, attach two files, one called charstack.h containing
the class definition and one called charstack.cpp containing the class
implementation.