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) { accNum = a; // Cannot access private variables name = n; // in the base class BankAccount ! balance = amount; } /* -------------------------------------------------- transfer(toAccount, amount) I left the "this" parameter to make it clearer. You can OMIT "this" in the program below ! -------------------------------------------------- */ public void transfer( BankAccount toAccount, double amount ) { this.withdraw(amount); // deduct amount from this account; toAccount.deposit(amount); // add amount to "toAccount"; } }