Skip to content

sebzcode/JavaCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ Java Swing Calculator

This is a Java-based Calculator application built using Swing for the graphical user interface (GUI).
The calculator supports basic arithmetic operations such as addition (+), subtraction (-), multiplication (*), and division (/) along with handling decimal numbers and operator precedence.

The application uses a custom expression evaluation method powered by stacks, ensuring that multi-operator expressions (e.g., 5+2-4*3/2) are computed correctly according to mathematical precedence rules.


โœจ Features

  • Clean and interactive Java Swing GUI
  • Supports multi-operator expressions
  • Handles decimal numbers
  • Clear (C) button to reset input
  • Operator precedence implemented with stacks
  • Beginner-friendly and extendable project

๐Ÿš€ How to Run

  1. Clone this repository:
    git clone https://github.com/thecopyninja55/Java-calculator.git
  2. Navigate into the project directory:
    cd Java-calculator
  3. Compile the program:
    javac Calculator.java
  4. Run the program:
    java Calculator
    

๐Ÿ› ๏ธ Tech Stack

  • Language: Java
  • GUI Framework: Swing (AWT components)
  • Concepts Used: Event-driven programming, Stacks, Expression Parsing

๐Ÿ“ˆ Future Improvements

  • Add support for brackets ( ) in expressions
  • Include advanced functions like square root, power, percentage
  • Improve UI design with modern styling
  • Add keyboard input support

๐Ÿ‘จโ€๐Ÿ’ป Author

๐Ÿง‘โ€๐Ÿš€ Developed by sebs

๐Ÿ‘‰ If you like this project, consider giving it a โญ on GitHub!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages