Name: Kushagra Bhardwaj
Roll No.: 2401010029
Course: Java Programming
Programme: B.Tech CSE Core
Session: 2025-26
This project is a console-based Calculator Application developed in Java.
It demonstrates the concept of method overloading by performing arithmetic operations with different data types and parameter combinations.
The program features a menu-driven interface that allows users to perform addition, subtraction, multiplication, and division operations efficiently while handling invalid inputs and exceptions gracefully.
- To implement and demonstrate method overloading in Java.
- To design a simple, interactive menu-driven calculator application.
- To handle exceptions such as divide-by-zero errors effectively.
- To reinforce understanding of object-oriented programming concepts and control structures.
- Overloaded Methods: Demonstrates method overloading with
add()methods accepting different parameter types and counts. - Arithmetic Operations: Supports addition, subtraction, multiplication, and division.
- Exception Handling: Safely manages invalid inputs and division by zero using
try-catch. - User Interaction: Menu-driven interface for smooth navigation.
- Input Validation: Prevents crashes from wrong data entries (non-numeric inputs).
- Language: Java
- IDE/Editor: Visual Studio Code (or any Java-supported IDE)
- Execution Environment: Java JDK
=== Calculator Application ===
1. Add Numbers
2. Subtract Numbers
3. Multiply Numbers
4. Divide Numbers
5. Exit
Enter your choice: 1
Choose Addition Type:
1. Add two integers
2. Add two doubles
3. Add three integers
Enter your choice: 1
Enter first integer: 10
Enter second integer: 20
Result: 30