A simple calculator application built using JavaFX for the user interface. This desktop application supports basic arithmetic operations such as addition, subtraction, multiplication, and division. The app features a responsive user interface with optional dark mode and includes utility classes for parsing operations and managing calculator states.
- Ensure you have Java 8 or later installed. ๐
- You need a properly configured Java Development Kit (JDK) to run the application. ๐ ๏ธ
- In case of missing dependencies, verify that all required libraries are included in the
libfolder or declared in thepom.xmlfile. ๐
-
Launch the Application:
- Run the application by executing the
MainClass.javain thecom.calculator.mainpackage. ๐
- Run the application by executing the
-
Calculator Interface:
- Numeric Buttons: Click or input numbers directly to the calculator. ๐ข
- Operation Buttons: Choose operations such as addition (
+), subtraction (-), multiplication (ร), division (รท) and more. โโโ๏ธโ - Display: The main display shows the current input and the result of calculations. ๐
- Equals Button: Compute the result of the current (binary) operation. โ
- Clear and Clear Entry Buttons: Reset the current input or operation. ๐งน
- Dark Mode Toggle: Switch between light and dark modes for a customized user experience. ๐
-
Core Functionality:
- Binary Operations: Handle operations that involve two numbers (e.g.,
5 + 3). - Unary Operations: Execute operations with a single operand (e.g., reciprocal or percentage).
- Binary Operations: Handle operations that involve two numbers (e.g.,
src/- Source code directorycom/calculator/- Java source filesconstants/- Operator constants used throughout the applicationcontroller/- ContainsCalculatorController.javafor managing the interface logicdarkMode/- Includes classes for handling dark mode (DarkModeSwitcher.java,ToggleSwitch.java)icon/- Utility for loading application icons (StageIconLoader.java)main/- Main entry point of the application (MainClass.java)parsers/- Logic for parsing binary and unary operationsstate/- Manages calculator state and operations (CalculatorState.java)
test/- Unit tests for the parser and constants classes
resources/- Resource directoryassets/images/- Icons and images for the application (calculator.png)styles/- CSS for styling the application (styles.css)calculator-main.fxml- FXML layout file for the calculator interface
This project is licensed under the MIT License. See the LICENCE file for details. ๐
For questions, feedback, or support:
- Author: Kacper Gรณrski
- LinkedIn: Kacper Gรณrski
- Instagram: @kxcper.gorski
- X: @Kerciuu
- GitHub: Kerciu
- Support: Email kacper.gorski.contact@gmail.com
For any issues, please open a GitHub issue. ๐