Cse 231 assignment on stacks- write a program that


Assignment on Stacks

Write a program that evaluates arithmetic expressions in infix notation that are not necessarily fully parenthesized. An arithmetic operation +, -, * or / has its usual precedence and associativity. You can assume that numbers are floating point numbers such as 10.23. Your program shall repeatedly request the user to input an expression and displays the value of the expression until the user does not want to continue. Your program needs to detect as many syntax errors as possible. You should also detect and capture the division by zero error.

You are required to use the stack class provided by Java Application Programming

Interface; please download Java documentation from java.sun.com and read about the Stack class provided by Java.

You are also required to document your program so that it can be understood by others such as the grader and the instructor.

Please submit

1. Analysis: test data;
2. Design:

- Class diagrams showing representation of data;
- A class invariant for each class;
- Pre/Post conditions for required operations;
- Algorithms for required operations. Algorithms can be described in English, flow diagrams, or sequence diagrams;

3. Code;

4. Screen snapshots of test runs.

Solution Preview :

Prepared by a verified Expert
Programming Languages: Cse 231 assignment on stacks- write a program that
Reference No:- TGS01724771

Now Priced at $40 (50% Discount)

Recommended (99%)

Rated (4.3/5)