package bankAccount; public class CashDeposit extends Deposit { Cash cash; /** * Creates an instance of CashDeposit, given an array of bills. Cash deposits are available immediatelly. */ public CashDeposit(Cash cash) { super(); // BUG this.cash = cash; } /** * Returns total amount of this CashDeposit */ public double getAmount() { return cash.getTotal(); } }