karvounis / Natural-Language-Calculator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Natural-Language-Calculator

This text-based console application is performing simple natural calculations. If the user enters "five times three" the app will output '15'.

#Guidelines:

  1. Input values are:
    • Whole numbers: [0,9]
    • Expressed as text.
    • Not case-sensitive.
  2. Arithmetic operations supported are not case-sensitive and are displayed in the following table:
  3. Operator Permitted Aliases
    Add (+) add, plus
    Subtract (-) subtract, minus, less
    Multiply (*) multiply-by, times
    Divide (/) divide-by, over
  4. Any number of operations are chained together.
  5. When two or more operations are chained together, any multiply or divide operation take precedence over any add or subtract operation, similar to how a real calculator works. However, no support exists for use of brackets to alter operator precedence

This calculator was implemented as an interview assignment.

About


Languages

Language:Java 100.0%