Skip to content

binhonglee/TextCalculation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TextCalculation

CircleCI Build Status

Basically, it will take in text instructions for calculation. The calculator with alphabets if you would.

Compatibility

  • Should supports all device with OracleJDK installed.
  • Requires Apache Ant installed (or you will need to manually compile the Java files).
  • Exclude any additional word (like "and") in the input file.
  • Only works for integers. Floats are currently unsupported.
  • Supports negative numbers.
  • Calculations are done from left to right. BODMAS and PEMDAS are not implemented.
  • THERE IS NO ERROR HANDLING FOR THE PROGRAM. INVALID INPUT WILL LEAD TO PROGRAM TERMINATION. (or inaccurate results)

Instructions

You will need Oracle JDK installed in your computer. There is no fancy UI in this but rather just a command line tool.

  1. Open up "input" file (or create a new empty file)
  2. Put in the instructions you want to calculate. For example two plus five
  3. Type ant execute into command line when in this folder (wherever you put it).
  4. There you have it! The answer is in the command line!

Input file

  • Refer to the example for formatting
  • Wordings for each operation
    • '+' - "plus"
    • '-' - "minus"
    • '*' - "times" or "multiply"
    • '/' - "over" or "divide"
  • It only supports up to "nine thousand nine hundred ninety nine". The use of any number larger than that may cause unexpected error resulting in inaccurate result
Note : This is something really basic and random that I came up with when I was stuck at the airport for a long layover. Do not expect this to be a fully functional program.

Releases

No releases published

Packages

No packages published

Languages