Objective:
Enhance stack exercises created in Lab 6 to evaluate a mathematical expression
Alternatively, you can use STL stack if that is easier for you
Overview:
Enhance the class you created in lab 6 (let's called it mathExp class) to include eval functions. The operators shall include +,-,*,/,(,) as minimum. If you can also support ++,--, mod, div, that will be great.
Write a main.cpp that creates a few test example mathExp objects that demonstrates the working of your mathExp class. (a sample is loaded in the attachments, add more expressions if you implement other operators, e.g. exp).
Challenge:
Can your program support floating point?
How about negative numbers such as -3+5*(-2)?
If requirements need to add another operator, how easy is it to enhance the program?
Does it have any error checking capability?