001package headfirst.combining.factory; 002 003public class DuckFactory extends AbstractDuckFactory { 004 005 public Quackable createMallardDuck() { 006 return new MallardDuck(); 007 } 008 009 public Quackable createRedheadDuck() { 010 return new RedheadDuck(); 011 } 012 013 public Quackable createDuckCall() { 014 return new DuckCall(); 015 } 016 017 public Quackable createRubberDuck() { 018 return new RubberDuck(); 019 } 020}