import java.util.ArrayList; /** A piece of paper -- intermediate version */ public class Paper2 implements IJudger { private double width, height; private static double minUsefulDimension = 3.5; /** Creates a new instance of Paper */ public Paper2(double w, double h) { this.width = w; this.height = h; } /** Filter to return only the big enough pieces of paper. */ public boolean isBigEnough() { if (this.width >= minUsefulDimension && /*** POINT X ***/ this.height >= minUsefulDimension) { return true; } else { return false; } } public boolean isAcceptable() { return isBigEnough(); } public static ArrayList goodPapersOnly(ArrayList all) { ArrayList output = new ArrayList(); java.util.Iterator aIter = all.iterator(); while (aIter.hasNext()) { IJudger thisOne = (IJudger) aIter.next(); if (thisOne.isAcceptable()) { /*** POINT Y ***/ output.add(thisOne); } } return output; } //end class }