Question: Programming Questions (50 marks): Q4. In this programming assignment, you will expand and implement the pseudo code discussed in class for an arithmetic calculator that

Programming Questions (50 marks): Q4. In this programming assignment, you will expand and implement the pseudo code discussed in class for an arithmetic calculator that uses two different stacks. The expansion will involve inclusion of more binary operators and the parentheses pairs (possibly nested ones). You will implement your code in Java. Your arithmetic calculators must read lines of text from a text file, where each line contains a syntactically correct arithmetic expression. Your output file must repeat the input line and print the computed result on the next line. Your calculators must support the following operators on integers and observe the standard operator precedence as shown in the following ( 1 to 6:1 is the highest and 6 is the lowest. Same precedence operators are evaluated from left to right). 1. Parentheses (possibly nested ones): (, Binary operators: 2. power function: xy. 3. operators: ,/ 4. operators: +, 5. operators: >,,,
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
