This repository contains a simple calculator program implemented in Java. The calculator provides basic arithmetic operations such as addition, subtraction, multiplication, and division. The graphical user interface (GUI) is built using Java AWT and handles user input through buttons.
- Java: The programming language used to develop the calculator..
- AWT (Abstract Window Toolkit): The Java package used for creating the graphical user interface..
Follow these steps to run the calculator program:
- Make sure you have Java installed on your system.
-
Clone the repository to your local machine.
git clone https://github.com/Muzamil-Gashroo/calculator-java.git
-
Navigate to the project directory.
cd calculator-java
-
Compile the Java program.
javac Calculator.java
-
Run the compiled program.
java Calculator
-
The calculator GUI will open, allowing you to perform basic arithmetic operations.
- The calculator supports the digits 0-9.
- Use the
+
,-
,*
, and/
buttons for addition, subtraction, multiplication, and division, respectively. - Press the
=
button to calculate the result. - Use the
CLR
button to clear the input field..
This project is licensed under the MIT License. Feel free to use, modify, and distribute the code as per the license terms.