JAVA TASK (Exception Handling)
JAVA TASK (Exception Handling)
Create a basic calculator that can perform addition, subtraction, multiplication, and division.
Implement exception handling to manage invalid inputs and division by zero.
1. InvalidInputException: Throw this exception for invalid input (e.g., non-numeric input).
1. Create Account: Create new accounts with a unique account number and an initial balance.
3. Withdraw: Allow withdrawals from accounts, ensuring the amount is positive and does not
exceed the current balance.
4. Transfer: Allow transferring money between two accounts, ensuring sufficient balance in the
source account.
4. TransferException: Throw this exception for any errors during the transfer process.
Task 3: Develop a Student Management System
1. Add Student: Add new students with details like name, age, and grade.
4. Search Student by Name: Search for a student by their name and retrieve their details.
1. InvalidAgeException: Throw this exception if the age provided is not within a valid range
(e.g., 5-100).
3. InvalidGradeException: Throw this exception if the grade provided is invalid (e.g., not in A-F
range).