I want to ask something about duck example on this book that made me confused and I feel contradictions.
Problem
the conclusions
He said "when joe added new behavior to the duck superclass, he was also adding behavior that was not appropiate for sume Duck subclasses"
BUT in the conclusion he added performFly()
and performQuack();
what is the different because i think it same with he was also adding behavior that was not appropiate for sume Duck subclasses
?
**image taken from the book Head first design pattern
** this question doesn't state this book is not good, this book is really good in my opinion. this is just me who is asking something that I didn't get from the book.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…