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