Question: ( Due November 6 ) Write a program that, given an arithmetic expression, first transforms it to a postfix form, and then computes its value
Due November Write a program that, given an arithmetic expression,
first transforms it to a postfix form, and then
computes its value by using the stackbased algorithms that we recalled in class
You can assume that the expression contains no variables, only numbers, and all the numbers are onedigit numbers, ie each of these numbers is either or or dots, or For example, your program should correctly process expressions like but there is no need to process expressions like For simplicity, assume that the only arithmetic operations are addition subtraction and multiplication and that there are no parentheses.
Comments:
as with all programming assignments for this class, submit a file containing the code, and a file containing an example of what this program generates on each step;
ideally, use Java, but if you want to write it in some other programming language, check with the TA that it is OK; usually, C or are OK
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
