001package headfirst.strategy; 002 003public class MiniDuckSimulator { 004 005 public static void main(String[] args) { 006 007 MallardDuck mallard = new MallardDuck(); 008 RubberDuck rubberDuckie = new RubberDuck(); 009 DecoyDuck decoy = new DecoyDuck(); 010 011 ModelDuck model = new ModelDuck(); 012 013 mallard.performQuack(); 014 rubberDuckie.performQuack(); 015 decoy.performQuack(); 016 017 model.performFly(); 018 model.setFlyBehavior(new FlyRocketPowered()); 019 model.performFly(); 020 } 021}