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

  Utilizing the step-by-step mrp calculation process students

utilizing the step-by-step mrp calculation process students will solve the following mrp problem given product a is an

  Develop a c# console application that compute pythogorus

Develop a C# console application that computes the hypotenuse of a right triangle

  Display information about users that are currently logged in

Create a new file titled TestWork.scr Change the permissions on this new file to add the execute bit for user, group, and owner. Edit your new file using Gedit or VI and change it so it performs the following actions:

  Write program that stores this information in a two-d array

Write a program that stores this information in a two dimensional 3 × 7 array, where each row represents a different monkey and each column represents a different day of the week.

  Draw a flowchart to accept five daily temperature readings

Draw a flowchart to accept five daily temperature readings and displays the highest, lowest, and average (mean) temperatures. Use a For loop to take the five readings.

  Define the primary keys and foreign keys for tables

Define the following primary keys and foreign keys for these two tables. Use multiple DDL statements for this

  Prepare a php form which allows input for an individual and

create a php form that allows input for an individual and displays the information on a subsequent page upon

  Hru access control matrix model

How will the matrix above result if we execute the command and Write a command delete_object(sub1,sub1) that will delete any occurrences of sub1 if sub1has the right m with itself

  Write standalone program with recursive method string

Write a standalone program "TransformCharacters.java" with a recursive method String string changeCharacters(String string) that takes as an argument a string.

  Write a program to manage a user list that can be modified

Write a program to manage a user list that can be modified and saved to a text file. Input text file consisting of pairs of usernames and passwords, separated by a colon (:) without any spaces.

  Game of life

The game is played on the rectangular board. Each square at time T could contain 1 that indicates the presence of the organism (life) or 0 that indicates the absence of the organism (death).

  Design logic that continuously prompt user for numeric value

Design the logic for a program that continuously prompts a user for a numeric value until the user enters 0. The application passes the value in turn to a method that squares the number

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