001package headfirst.adapter.ducks;
002
003public class TurkeyAdapter implements Duck {
004        Turkey turkey;
005
006        public TurkeyAdapter(Turkey turkey) {
007                this.turkey = turkey;
008        }
009
010        public void quack() {
011                turkey.gobble();
012        }
013
014        public void fly() {
015                for(int i=0; i < 5; i++) {
016                        turkey.fly();
017                }
018        }
019}