Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

33 Commits

Folders and files

Repository files navigation

🧮 Calculator

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.


✨ Features

  • 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.

🚀 Getting Started

Prerequisites

  • Java 17 or newer
  • Maven

Build & Run

  1. Clone the repository:

    git clone https://github.com/yourusername/Kalkulator.git
    cd Kalkulator
  2. Build the project:

    mvn clean package
  3. Run the application:

    java -jar target/calculator-1.0-SNAPSHOT.jar

🖥️ Usage

Console UI

  • Launches by default if GUI is not enabled.

  • Type equations like 2 + 2, sqrt 9, 3 !, or 2 ^ 8.

  • Type exit to quit.

  • image

GUI

  • Click buttons or type using your keyboard.

  • Supports all operations listed above.

  • View calculation history and recall previous results.

  • image


🛠️ Project Structure

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)

📦 Extending the Calculator

  • Add new operations:
    Implement the Operation interface and register your operation in CalculatorServiceImpl.
  • Add new UI:
    Implement the UserInterface interface and add your UI to the app entry point.

🤝 Contributing

Contributions are welcome! Please open issues or submit pull requests for new features, bug fixes, or improvements.


📄 License

This project is licensed under the MIT License.


👤 Author


Enjoy using Kalkulator! If you find it useful, give it a ⭐ on GitHub!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages