Program 1: Bank Account Management
Problem Statement:
Create a class BankAccount with the following:
Data members: accountNumber, accountHolderName, balance
Getter and Setter methods
Methods: deposit(), withdraw()
Add toString()
Write a main program to:
Create two account objects and assign values to data members using setters
Perform deposit and withdrawal operations.
Display account details after each operation using getters.
Program 2: Inheritance - Employee Hierarchy
Problem Statement:
Create a base class Employee with:
empId, name, basicSalary
Method: displayDetails()
Create a derived class Manager:
Additional field: bonus
Override the displayDetails() method to include bonus and calculate total salary.
In the main method:
Create objects of both Employee and Manager and display their details.
Program 3 : Interface Implementation – Payment Gateway System
Problem Statement:
Define an interface Payment with a method processPayment(double amount).
Implement the interface in two classes:
CreditCardPayment (prints: "Paid [amount] using Credit Card.")
UPIPayment (prints: "Paid [amount] using UPI.")
In the main program:
Accept user input to choose payment method and amount.
Call processPayment() using the interface reference.