TextCalculation
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.
- Open up “input” file (or create a new empty file)
- Put in the instructions you want to calculate. For example
two plus five
- Type
ant execute
into command line when in this folder (wherever you put it). - 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