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 utility that converts dollars to coins

For the program, you will write a utility that converts dollars to coins. It is a simple program that must have the following: Multiple outputs to the screen

  Create useful and well-designed programs

Create useful and well-designed programs that use subroutines, functions, menus, dialog boxes, and other related form objects to solve practical business problems.

  Create a formula to have excel compute annual savings

You do not need to put in personal information or actual values if you do not wish, but you must include some data for each of the various categories and income and expense line items.

  Program to run at end of semester to produce grade summary

Write the program for instructor to run at the end of the semester to produce grade summary for one student, as shown in box below.

  Create the structure with 3 members and fill in data

Create a function that will display() all the data for each member and call it from the main program.

  When the program starts the user is asked to seed the

write a program that lets the user play the game of rock paper scissors against the computer. the program should work

  Pseudo code for recursive function to print prime numbers

Write in pseudo code the recursive function which receive 2 integers (a and b) and returns sum of all common prime dividers (1 is not prime).

  Functions of standard and statistical calculators

Write a windows application in Visual Basic to perform functions of standard and statistical calculators.

  Prepare a vba macro for the bisection method

Prepare a VBA macro for the bisection method and also determine the real roots of the subsequent equation using the written equation: f(x)=-.6x^2+2.4x+5.5

  What are advantages of using menus in a gui application

What are advantages of using menus in a GUI application? Design a menu structure for a program you would find useful in your work or hobbies. Write and post the code for the menu creation

  Derive the cube class from the base square class.

In your derived class have the default values for side be 1. For the cube class include a public function calcVal that evaluates the volume of the cube. (Hint: The volume of the cube is side * square :: calcVal.)

  Write a program to create three identical list

Write a program to create three identical list, list1, list2, and list3, of 5000 elements. The program then sorts list1using quick sort, list 2 using insertion sort.

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