Class inheritance and encapsulation
public class DPSAccount extends Bank {
public DPSAccount() {
super();
}
public DPSAccount(String bankName, String address, int numberofBranch) {
super(bankName, address, numberofBranch);
}
// calculateAmount() method.
public double calculateAmount(double amount) {
return amount + (4.5/100)*amount;
}
}