Skip to content

Dilshan-Kumarasingha/Calculator-in-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Calculator-in-Java

This project is a simple calculator written in Java that can perform basic arithmetic operations (+, -, *, /). It also includes additional features such as clearing the display, deleting the last entered number, and changing the number format. The calculator utilizes the Swing library to create a user-friendly graphical user interface (GUI).

Features

  • Performs basic arithmetic operations (+, -, *, /).
  • Clears the display.
  • Deletes the last entered number.
  • Changes the number format.

Requirements

  • Java 8 or higher
  • Swing library

How to Run

To run the calculator, follow these steps:

  1. Clone the GitHub repository to your local machine.
  2. Open the project in your favorite Java IDE.
  3. Locate and run the Calculator.java file.

User Guide

Upon running the calculator, you will be presented with a graphical interface that resembles a typical calculator. Here's a breakdown of the different components and how to use them:

  • Number Buttons: Press these buttons to enter numeric values.
  • Operator Buttons: Use these buttons to select the desired arithmetic operation.
  • Equals (=) Button: Press this button to perform the calculation and display the result.
  • Clear Button: Clicking on this button will clear the entire display.
  • Delete Button: Clicking on this button will remove the last entered digit or operator.
  • Number Format Dropdown: Use this dropdown to change the number format (e.g., decimal, scientific notation).

To perform a calculation, follow these steps:

  1. Enter the first number using the number buttons.
  2. Select the desired arithmetic operation using the operator buttons.
  3. Enter the second number using the number buttons.
  4. Press the equals (=) button to display the result.

About

This project is a simple calculator that can perform basic arithmetic operations (+, -, *, /). It also has the ability to clear the display and delete the last entered number

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages