class FixedDepositAccount extends SavingsAccount { double minFixedDeposit; FixedDepositAccount(int a, String b, double c, float d, double minFixedDeposit) { super(a, b, c, d); this.minFixedDeposit = minFixedDeposit; System.out.println("FixedDepositAccount ctor..."); } void calculateCompoundInterest(int years) { // Formula for compound interest: A = P(1 + r/n)^(nt) // where P is principal, r is the annual interest rate, n is the number of times interest is compounded per year, and t is the time in years. double compoundInterest = accountBalance * Math.pow((1 + rateOfInterest / 100), years) - accountBalance; System.out.println("Compound Interest after " + years + " years: " + compoundInterest); } } class CreditAccount extends BankAccount { double cashLimit; double creditLimit; CreditAccount(int a, String b, double c, double cashLimit, double creditLimit) { super(a, b, c); this.cashLimit = cashLimit; this.creditLimit = creditLimit; System.out.println("CreditAccount ctor..."); } } class CurrentAccount extends BankAccount { double overdraftLimit; CurrentAccount(int a, String b, double c, double overdraftLimit) { super(a, b, c); this.overdraftLimit = overdraftLimit; System.out.println("CurrentAccount ctor..."); } } public class BankTest { public static void main(String[] args) { // Existing code... FixedDepositAccount fdAccObj = new FixedDepositAccount(777, "Alice", 100000, 8.0f, 50000); fdAccObj.showBankAccount(); fdAccObj.calculateCompoundInterest(3); CreditAccount creditAccObj = new CreditAccount(888, "Bob", 20000, 10000, 50000); creditAccObj.showBankAccount(); CurrentAccount currentAccObj = new CurrentAccount(999, "Charlie", 30000, 20000); currentAccObj.showBankAccount(); } }