Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Java Calculator

A simple console-based Calculator built using Java. This project performs basic arithmetic operations through a menu-driven interface and demonstrates core Java programming concepts.

Features

  • ➕ Addition
  • ➖ Subtraction
  • ✖️ Multiplication
  • ➗ Division
  • Even Odd check
  • Currency converter IND-USD
  • MIN/MAX number checker
  • 🧮 Remainder (Modulus)
  • 📋 Menu-Driven Program
  • 🔁 do-while Loop
  • 🔀 switch-case
  • ⚠️ Exception Handling
  • ✅ Input Validation

Concepts Used

  • Java Methods
  • Scanner Class
  • Conditional Statements (if, switch)
  • Loops (do-while)
  • Exception Handling (try-catch-finally)
  • ArithmeticException
  • InputMismatchException

Technologies

  • Java
  • JDK 17+ (or any compatible version)

Project Structure

Calculator.java
README.md

How to Run

Project Preview

Calculator Output

  1. Clone the repository
git clone https://github.com/AmanBarbate/Java-Calculator.git
  1. Open the project in your IDE (VS Code, IntelliJ IDEA, or Eclipse).

  2. Compile the program

javac Calculator.java
  1. Run the program
java Calculator

Sample Output

========== JAVA CALCULATOR ==========
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Remainder
6. Exit

Enter your choice: 1

Enter first number: 20
Enter second number: 30

Result = 50

Future Improvements

  • Scientific Calculator
  • Power and Square Root Operations
  • Calculation History
  • GUI Version using Java Swing or JavaFX
  • File Storage for History

Author

Aman

Learning Java and building projects to improve problem-solving and software development skills.

⭐ If you found this project useful, consider giving it a star.

About

A console-based Java Calculator using methods, switch-case, loops, and exception handling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages