Skip to content

YuriHeiko/MathExpressions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MATH EXPRESSIONS CALCULATOR

Task
You have to create a Calculator app. It should solve simple math expressions with integers, i.e.:

(2 + 3) * 4

All the operations should be calculated according to their math precedence.

Optional:

  1. Add history of calculations that should be stored in a standard Java collection
  2. Add commands 'history' and 'history unique' that show history of calculations and history whithout duplicates
  3. Add the 'exit' command
  4. Add the 'operators' command which shows the list of allowed math operators
  5. Your algorithm should be friendly to adding new operators

The description of app work
A user runs the app and types an expression to calculate. The application returns the evaluated result and prompt to either do another calculation or exit.

Incoming parameters
A string that represents a simple math expression that can be empty ot contain an invalid expression.

Result
The result of the evaluated expression or error message otherwise.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages