Simple Java Calculator

This is a basic console-based calculator application implemented in Java. The application performs basic arithmetic operations like addition, subtraction, multiplication, and division.

Getting Started

Follow these instructions to run this application on your local machine for development and testing purposes.

Prerequisites

Ensure you have Java Development Kit (JDK) installed on your machine. If not, download it from the official Oracle website.

Directory Structure

The project follows this directory structure:

project_directory

│ Main.java
└───Calculator
    │ Calculator.java

How to Run

  1. Navigate to the project directory where Main.java is located.

  2. Compile the Java files using the command: javac Main.java Calculator/Calculator.java.

  3. Run the application using the command: java Main.

On execution, the application prompts you to input two numbers and an operator (+, -, *, /). After input, the application displays the result of the operation on the console.

Structure

The project is divided into two main files:

  1. Main.java - This is the entry point of the application. It handles user input and output.

  2. Calculator/Calculator.java - This file contains the Calculator class, which implements the basic arithmetic operations.

Built With

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgements

  • Thanks to OpenAI for their AI model, GPT-3 for generating this Learning Project Idea.