Equation Evaluator Project

Create a Program that will accept an equation as input from the user using standard algebraic format.

Examples:
N O N (ENTER)
(N O N) O N (ENTER)
( ( ( N  O N O N ) O N O ( N O N ) O N ) O N ) O N (ENTER)

where N is a number and O is either a math or logical comparison operator. The entire entry must be entered as a single input with one enter key click.

The Math operators that must be accepted are:
+ addition
– subtraction
* multiplication
/ division
% modulus

The comparison operators are:
== equals
!= not equals
@= absolute value of both are equal
< less than
<= less than or equals
> greater than
>= greater than or equals
NOTE: You are not required to include comparisons of equations. You may limit comparisons to just 2 numbers.

The use of math operators will cause the resulting number to be displayed.

The use of a comparison will cause “True” of “False” to be displayed.

Allow the user to repeat the inputting of expressions as many times as they would like. The program must not fail due to improper user input, so, you must catch error exceptions and handle them.

NOTE: I suggest that you use the algorithm in the attached Word document as your basic equation parsing algorithm. You must use two stacks, based on the Stack ADT, to parse the user inputted equation.

Include your algorithms, and other appropriate documentation in your code. Include UMLs for any  classes that you use to create objects.
—————————————————————————-
1. While there are still tokens to be read in,

  1.1 Get the next token.

  1.2 If the token is:

      1.2.1 A number: push it onto the value stack.

      1.2.2 A variable: get its value, and push onto the value stack.

      1.2.3 A left parenthesis: push it onto the operator stack.

      1.2.4 A right parenthesis:

        1 While the thing on top of the operator stack is not a

          left parenthesis,

            1 Pop the operator from the operator stack.

            2 Pop the value stack twice, getting two operands.

            3 Apply the operator to the operands, in the correct order.

            4 Push the result onto the value stack.

        2 Pop the left parenthesis from the operator stack, and discard it.

      1.2.5 An operator (call it thisOp):

        1 While the operator stack is not empty, and the top thing on the

          operator stack has the same or greater precedence as thisOp,

          1 Pop the operator from the operator stack.

          2 Pop the value stack twice, getting two operands.

          3 Apply the operator to the operands, in the correct order.

          4 Push the result onto the value stack.

        2 Push thisOp onto the operator stack.

2. While the operator stack is not empty,

    1 Pop the operator from the operator stack.

    2 Pop the value stack twice, getting two operands.

    3 Apply the operator to the operands, in the correct order.

    4 Push the result onto the value stack.

3. At this point the operator stack should be empty, and the value

  stack should have only one value in it, which is the final result.

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational