Make a program fro Stack ising java which should evaluate the algebraic expresions.
Course: Data Structure and
Language: Java
Please solve problem completely according to requirement, program should must be follow all the rules of menu base system which are required and write in question:
Attach the output's screentshots and explain every line with comments:
Whole code should be user defined inputs not same like exmple:
Task 2: (Stacks):
Make a program fro Stack ising java which should evaluate the algebraic expresions.
Evaluation of Algebraic Expression:
Your program will take an infix algebraic expression as an input from user. It will check that whether it is a valid expression or not. Then It will be converted into postfix
expression, and at the end it will be evaluated and print the result of the expression.
For example:
if input is: (3+5)*(7
output: it is invalid.
If input is: (3+5)*7 , display
Postfix form: 35+7*
Answer: 56
Step by step
Solved in 2 steps