Write a program that evaluates arithmetic expressions

Assignment Help Programming Languages
Reference no: EM131322119

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.

Reference no: EM131322119

Questions Cloud

Why is health a social issue as much as a biological issue : Why is health a social issue as much as a biological issue? Name three ways in which health and medicine are linked to social inequality?
Design a predictor that would achieve a perfect accuracy : You predictor should be a sequential circuit with one output that provides a prediction (1 for taken, 0 for not taken) and no inputs other than the clock and the control signal that indicates that the instruction is a conditional branch.
Structure analysis a systematic method : 1.) What makes event structure analysis a systematic method? 2.) How and why did evaluation research develop? How does it differ from other types of social science research? 3.) What is the difference between stakeholder and researcher orientation? ..
What does a correlation coefficient tell us : What are the three ways in which researchers assess the reliability of their measures? Be sure that you understand the differences among these three approaches to reliability.
Write a program that evaluates arithmetic expressions : CSE 231: 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.
Why researchers use this minimum criterion for reliability : What is the minimum reliability coefficient that researchers consider acceptable? Why do researchers use this minimum criterion for reliability?
References to which variables exhibit temporal locality : How many 16-byte cache blocks are needed to store all 32-bit matrix elements being referenced?
How did china and japan differ in their paths to industry : What sorts of things did the US and USSR do in order to try to win the Cold War? Evaluate each country's strategies. Did the US do a good job? Did the USSR? What did each side do well, and what could each side have done better? Illustrate your poi..
Develop a cinema ticket booking application in java : Develop a Cinema Ticket Booking Application in Java with the following functionality, available from the console: Requests the Customer's name, age and asks if they are a student

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd