
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Razdan 2/17/
Instructions: This is a programming home work.
This is a homework in which you will implement a simple interface for stacks. You can use an array or linked list (yours or Java’s collection class). You will implement the stack(s) in such way to implement an infix expression evaluator.
An example of an infix expression is as follows: {3*(4 + 2) * (6 – 2) * ( 2 + (7 + 3)/2) }
All four operators i.e. * / + and – are allowed. All three parenthesis are allowed i.e. {}, (), []. All input will be legal.
Your program should run in an infinite loop until the character “e” or “E” or “Esc” is pressed. Your program should ask for an expression. Upon hitting the “return” key, you should evaluate the expression and out the result.
Three test cases will be run each worth 1 point.