public class CheckingAccount extends BankAccount { // Inherits: // Variables: accNum, name, balance // Methods: deposit(amount), withdraw(amount) /* ---------------------------------------------- Constructor: CheckingAccount(a, n, amount) ---------------------------------------------- */ public CheckingAccount(int a, String n, double amount) { super( a, n, amount ); } /* ---------------------------------------------- DEFAULT Constructor: ---------------------------------------------- */ public CheckingAccount( ) { // Nothing !!! (So java will insert: "super();" } /* ------------------------------------- transfer(toAccount, amount) ------------------------------------- */ public void transfer( BankAccount toAccount, double amount ) { this.withdraw(amount); // deduct amount from this account; toAccount.deposit(amount); // add amount to "toAccount"; } }