Question: i'm learning about JAVA language but this one is very difficult, so please help me if you guys can. Create a simple calculator program. The
i'm learning about JAVA language but this one is very difficult, so please help me if you guys can. Create a simple calculator program.
The program will receive a String input which begin with a number and finish/end with an equation mark/character: = Assume that user will always give a correct input Reject input that do not begin with number and ending with = The program need to have these behavior: Can not have bracket ( ) Do not follow hierarchy order of calculation, calculation will always start from left to right, regardless of the operation type.
-----------------------------------
Example:
Input: 1+2-3*4/5=
Output: 0
Input: 2+4/3
Output: Exception(error)
Example:
Input: (2+3)+4
Output: Exception(error)
Input: 2+4/3=
Output: 2
Input: 2+-5+4=
Output: Exception(error)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
