A modern, extensible calculator application written in Java, featuring both a console and graphical user interface (GUI). Designed for clarity, flexibility, and ease of use.
- Basic arithmetic: Addition, subtraction, multiplication, division, percentage, negation.
- Advanced operations: Power, roots (including n-th root), factorial, brackets and more.
- History: View and navigate through previous calculations.
- Multiple UIs:
- Console UI: Lightweight, keyboard-driven interface for quick calculations.
- GUI: User-friendly graphical interface with buttons and input field.
- Extensible architecture: Easily add new operations or UI types.
- Java 17 or newer
- Maven
-
Clone the repository:
git clone https://github.com/yourusername/Kalkulator.git cd Kalkulator -
Build the project:
mvn clean package
-
Run the application:
java -jar target/calculator-1.0-SNAPSHOT.jar
-
Launches by default if GUI is not enabled.
-
Type equations like
2 + 2,sqrt 9,3 !, or2 ^ 8. -
Type
exitto quit.
-
Click buttons or type using your keyboard.
-
Supports all operations listed above.
-
View calculation history and recall previous results.
src/
└── main/
└── java/
└── com/
└── pajor/
└── calculator/
├── app/ # Application entry point
├── core/ # Core calculation logic and operations
├── service/ # Calculation services and history
└── ui/ # User interfaces (console & GUI)
- Add new operations:
Implement theOperationinterface and register your operation inCalculatorServiceImpl. - Add new UI:
Implement theUserInterfaceinterface and add your UI to the app entry point.
Contributions are welcome! Please open issues or submit pull requests for new features, bug fixes, or improvements.
This project is licensed under the MIT License.
Enjoy using Kalkulator! If you find it useful, give it a ⭐ on GitHub!

