https://github.com/nurulashraf/java-basic-calculator
A simple Java-based calculator for performing basic arithmetic operations (addition, subtraction, multiplication, division) with user-friendly input handling and error validation. Perfect for beginners exploring Java programming concepts.
https://github.com/nurulashraf/java-basic-calculator
basic-arithmetic beginner-friendly calculator command-line-application error-handling java java-basics java-projects simple-program
Last synced: about 2 months ago
JSON representation
A simple Java-based calculator for performing basic arithmetic operations (addition, subtraction, multiplication, division) with user-friendly input handling and error validation. Perfect for beginners exploring Java programming concepts.
- Host: GitHub
- URL: https://github.com/nurulashraf/java-basic-calculator
- Owner: nurulashraf
- License: mit
- Created: 2025-01-28T06:53:20.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-01-28T07:21:16.000Z (11 months ago)
- Last Synced: 2025-01-28T07:29:20.527Z (11 months ago)
- Topics: basic-arithmetic, beginner-friendly, calculator, command-line-application, error-handling, java, java-basics, java-projects, simple-program
- Language: Java
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Java Basic Calculator
A simple Java-based calculator that performs basic arithmetic operations: addition, subtraction, multiplication, and division. It includes error handling and user-friendly input validation, making it a great project for beginners learning Java.
---
## Features
- Perform basic arithmetic operations: `+`, `-`, `*`, `/`.
- Handles division by zero with appropriate error messages.
- Simple and intuitive command-line interface.
- Organised with a proper package structure.
---
## Installation and Usage
### Prerequisites
- Java Development Kit (JDK) 8 or later installed.
- A code editor or IDE such as IntelliJ IDEA, Eclipse, or VS Code.
### Steps to Run the Project
1. Clone the repository:
```bash
git clone https://github.com/nurulashraf/java-basic-calculator.git
```
2. Navigate to the project directory:
```bash
cd java-basic-calculator
```
3. Compile the code:
```bash
javac src/Calculator.java
```
4. Run the program:
```bash
java -cp src calculator.Calculator
```
---
## Project Structure
```
java-basic-calculator/
├── src/
│ └── Calculator.java # Main program file
├── LICENSE # MIT License
└── README.md # Project documentation
```
---
## Contributing
Contributions are welcome! If you have suggestions or improvements, please fork the repository and submit a pull request. For significant changes, feel free to open an issue to discuss them first.
---
## License
This project is licensed under the [MIT License](LICENSE).