Write a program that graphically displays a working calculator for simple infix expressions that consist of singledigit operands; the operators +, -, *, and /; and parentheses. Make the following assumptions:
● Unary operators (as in -2) are illegal.
● All operations, including division, are integer operations.
● The input expression contains no embedded spaces and no illegal characters, since it is entered by using a keypad.
● The input expression is a syntactically correct infix expression.
● Division by zero will not occur. (Consider how you can remove this restriction.)
The calculator has a display and a keypad of 20 keys, which are arranged as follows:
![]()
As the user presses keys to enter an infix expression, the corresponding characters appear in the display. The C (Clear) key erases all input entered so far; the<(Backspace) key erases the last character entered. When the user presses the = key, the expression is evaluated and the result replaces the expression in the display window. The user can then press C and enter another expression. If the user presses the Q (Quit) key, the calculator ceases operation and is erased from the screen.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.