package class2_1_DuckStrategies_v6; import java.awt.Point; /** * This class represents a specialized type of Duck * @author hornick */ public class Decoy extends Duck { /** * Decoy-specific constructor */ public Decoy(String name) { super(name,"decoy.jpg"); this.setBehaviors(new HorizontalSwimming(this), new NoQuacking()); // this value defines how far the duck moves each update period - s random value between 1 and 3. increment = new Point(random.nextInt(3)+1, 0 ); } }