Skip to content

raflimr/UAS_UICI_PBO_Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Java AWT Calculator

This is a simple calculator application built using Java AWT and Swing components. The calculator supports basic arithmetic operations including addition, subtraction, multiplication, division, and exponentiation.

Features

  • Basic arithmetic operations: addition, subtraction, multiplication, division
  • Exponentiation
  • Clear functionality
  • Keyboard support for Enter (evaluate) and Delete (clear)

Prerequisites

  • Java Development Kit (JDK) 8 or higher
  • Apache NetBeans IDE (or any other Java IDE)

Getting Started

Running the Application in Apache NetBeans

  1. Clone the repository or download the source code.

  2. Open Apache NetBeans.

  3. Create a new Java project:

    • Go to File > New Project.
    • Select Java > Java Application.
    • Click Next.
  4. Import the source code:

    • Copy the Main.java file into the src folder of your new project.
  5. Build and run the project:

    • Right-click on the project in the Projects pane.
    • Select Run.

Running the Application from the Command Line

  1. Clone the repository or download the source code.

  2. Navigate to the project directory:

    cd /path/to/project
  3. Compile the Java file:

    javac Main.java
  4. Run the compiled Java class:

    java Main

Usage

  • Use the buttons on the calculator to input numbers and operations.
  • Press = to evaluate the expression.
  • Press C to clear the input.
  • You can also use the keyboard:
    • Press Enter to evaluate the expression.
    • Press Delete to clear the input.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors