Question
Create a C++ application to manipulate polynomials. The program will behave as a simple calculator that does addition, subtraction, multiplication, and division, all on polynomials.
Create a C++ application to manipulate polynomials. The program will behave as a simple calculator that does addition, subtraction, multiplication, and division, all on polynomials.
Use the reverse Polish calculator model (stack based) in your implementation. In the reverse Polish based calculator, the operands are entered first, followed by specifying the operation. The operands are pushed onto a stack. When an operation is performed, it pops its operands from the stack and pushes its result back onto the stack.
Assume the character ? denotes pushing an operand onto the stack. Also, the characters +, -, *, and /, represent the known arithmetic operations. The character = means printing the top of the stack without popping it off. Therefore, ? ? + = means reading two operands, then calculating and printing their sum.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started