import java.util.ArrayList; /** A bank account for a customer. First version */ public class BAccount1 { private String owner; private double balance; private double minGoodBalance = 1000.00; /** Creates a new instance of BAccount */ public BAccount1(String ownerName, double initialBalance) { this.owner = ownerName; this.balance = initialBalance; } public boolean isGoodCustomer() { if (this.balance > minGoodBalance) { /*** POINT X ***/ return true; } else { return false; } } public ArrayList goodCustomersOnly(ArrayList all) { ArrayList output = new ArrayList(); java.util.Iterator aIter = all.iterator(); while (aIter.hasNext()) { BAccount1 thisOne = (BAccount1) aIter.next(); if (thisOne.balance > minGoodBalance) { /*** POINT Y ***/ output.add(thisOne); } } return output; } //end class }