package class1_3_DuckStrategies_v5; public class StandardQuacking implements QuackBehavior { /** The duck this quacker belongs to. */ private Duck parent; public StandardQuacking(Duck parent) { this.parent = parent; } /** * Performs standard quacking. * Print duck's name to screen. */ @Override public void quack() { System.out.println(parent.getName() + ": quack!"); parent.quacker.play(); } }