https://github.com/umstek/exsolver
Expression solver.
https://github.com/umstek/exsolver
calculator java mathematics
Last synced: 8 months ago
JSON representation
Expression solver.
- Host: GitHub
- URL: https://github.com/umstek/exsolver
- Owner: umstek
- License: mit
- Created: 2014-08-27T03:03:05.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T02:37:27.000Z (almost 2 years ago)
- Last Synced: 2024-11-17T15:21:09.118Z (12 months ago)
- Topics: calculator, java, mathematics
- Language: Java
- Size: 79.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ExSolver
Expression solver.
Original Comments from 2013-12-28
mathex™ Solver.
mathex™ Solver simplifies any mathematical expression.
It can handle any number of nested brackets.
Variables which have their predefined values can be used in the expression.
Radix convertions from 2 to 36 including hexadecimal, octal and binary number systems are supported.
Various functions including but not limited to sin(), cos(), ln() ... are supported.
I followed the rule "practice design, not decoration" rule to some extent.
Tried to simplify the GUI to make the software more user-friendly.
I used swing controls designing the GUI.
Tooltips are used to guide the user to use the software.
I used the html-like tag support for clarity.
Internally, I used a constructor which accepts the expression as a String and, a TreeMap of variables.
I used a function called "selectAndSolve" which selects what operations to perform.
Being the main point of the program, it is recursively called by other parts of the program.
By doing so, I managed to decrease code redundancy.
I divided the program into different parts.
By using different methods for each of the operations, (one method for a operator and its opposite),
it was easy to maintain cohesion.
Before doing the calculation, I used a method to make it cleaner
(i.e.: removing whitespaces, adding operators where not given, remove repeated operators...).
I commented when necessary, so I can easily maintain the code.