Programming assignment using c++ and std library
For programming assignment 2 we are going to work with infix to postfix conversion. The starting point for the assignment is the infix to postfix conversion program provided by the textbook (program 7-3). A code blocks project with all the associated header files for this program is uploaded on canvas for your starting point. As provided the program issues two warnings and the error and exception handling does not work. The warnings are minor and do not cause a problem. Do not worry about the exception handling at this point. We are going to cover exception later in the course. If you input an invalid expression the program will lock up. You can just restart if that happens. At first run the program with the examples to see how the program functions. The main task of the assignment is to write your own stack class and use your stack to replace the stack from the standard library used by program 7-3. Program 7-3 uses the standard library stack in two places d rpn.h and d inftop.h. Your stack must use a dynamically allocated array that grows as needed to store stack the items. We covered how to do this in class with the miniVector class. The miniVector class is included with the material for the assignment. Your stack will also need to have functions top, push, pop, size and empty. These are the functions required by program 7-3. Your stack should also include a destructor to release the dynamically allocated memory at the programs completion. Hint: if you use a template class you only have to implement a single stack class for this assignment. Test your stack by pushing 0 through 9 on to the stack. Then use top to read the top value and pop to remove all elements from the stack. If your stack is working correctly you should get 9 through 0 out. After removing all ten items from the stack the empty function should return true. Include this output in your report to show that your stack is working