A Java-based calculator application with a GUI that provides basic arithmetic operations and number base conversion capabilities.
- Basic arithmetic operations (+, -, *, /)
- Number base conversion (between base 2 and base 10)
- Graphical user interface (GUI)
- Input validation
- Comprehensive logging system (file-based and Windows Event Viewer)
-
Windows operating system
-
To enable Event Viewer logging, run this command in an Administrator PowerShell:
New-EventLog -LogName Application -Source "SimpleCalculator"
(This step is optional but recommended for full logging support.)
- Input Validation: Ensures only valid characters and operations are processed.
- Base Conversion: Convert numbers between base 2 (binary) and base 10 (decimal).
- Expression Evaluation: Handles simple arithmetic expressions with proper operator precedence.
- Error Handling: Comprehensive error detection and user-friendly feedback.
- Logging: Detailed activity logging for debugging and monitoring, both locally and in the Windows Event Viewer.
- Go to the Releases page and download the
.msiinstaller. - Alternatively, you can build the project yourself from the source code.
- Launch the application.
- Use the calculator interface to:
- Type arithmetic expressions.
- Convert numbers between bases.
- View results.
- Press Enter to evaluate expressions.
- Use dedicated buttons for base conversion (once a button is used, use the tab button accordingly to refocus on the label).
- Press C to clear the input.
- Press Backspace to delete the last character.
The application maintains logs in two locations:
- File logs:
C:\Users\[username]\AppData\Local\SimpleCalculator\logs.txt - Windows Event Viewer:
Under the application name "SimpleCalculator" (Application log)
Current version: 2.0
- The application requires Windows OS for full functionality due to Event Viewer integration.
- Maximum equation length: 500 characters.
- Supported characters: digits (
0-9) and basic arithmetic operators (+,-,*,/). - Floating-point numbers are not supported.
- Negative numbers are supported.
- Maximum value: fits within an
int(up to 9 digits).
You can view or contribute to the project here:
🔗 SimpleCalculator GitHub Repository