op
op
setBalance(getBalance() - totalDeduction);
System.out.println("Withdrawn Rs " + amount + " with service
charges of Rs " + serviceCharge + " and transaction fee of Rs " +
transactionFee + ". New balance: Rs " + getBalance());
}
}
savingsAccount.addInterest();
savingsAccount.withdraw(15000);
currentAccount.withdraw(10000);
}
}
Class Definitions
1. BankAccount Class
o Attributes:
o Methods:
setAccountHolderName(String accountHolderName):
Sets the account holder’s name.
o Attributes:
o Methods:
o Attributes:
o Methods: