Project 2: Expression Evaluator
Project Description
Complete the Visual C++ 2019/C++ 20 console application project that implements the Expression Evaluator base code (provided) that reads integers and outputs the result. On the existing code base, you must implement the infix to postfix algorithm (Shunting yard algorithm by Edsger Dijkstra), then implement a postfix to result algorithm (Postfix algorithm).
Advanced requirements are graded only if the base (shunting yard and postfix algorithm) is complete and all test cases are working. The advanced requirements are to implement:
1. Real data type.
2. Mixed integer and real expressions.
3. Boolean data type along with its appropriate operators (AND, OR, NOT, XOR, NAND, NOR, XNOR) and real data types from the console and outputs the result.
4. Errors in the expression should be reported to the users and the program should continue operation (so program does not crash).
5. Variables
6. Stored Results (requires variable)
Note: Additional details, algorithms, design discussion will be provided in class.
Bonus features:
1. Add the Gregorian data type from Project 1.
2. You’ll need to add the packaged day, month, and year objects (integer only)
3. You’ll need operation objects to handle the day/month/year functions and the Gregorian constructor.
4. Create a specialized Gregorian operand (called now) that initializes to the current date.
5. You do not need to handle time of day.
6. Your objective is to be able to process expressions such as:
Gregorian(2019,10,10) + months(2) - days(5)
now > Gregorian(2019,10,8)+days(20)