| 表2—13鸭子种类及其特征 | |||
| 鸭子种类 | 发声特征 | 飞行特征 | 外观特征 |
| 灰鸭(MallardDuck) | 发出“嘎嘎”声(Quack) | 用翅膀飞行(FlyWithWings) | 灰色羽毛 |
| 红头鸭(RedHeadDuck) | 发出“嘎嘎”声(Quack) | 用翅膀飞行(FlyWithWings) | 灰色羽毛、头部红色 |
| 棉花鸭(CottonDuck) | 不发声(QuackNoWay) | 不能飞行(FlyNoWay) | 白色 |
| 橡皮鸭(RubberDuck) | 发出橡皮与空气摩擦的声音(Squeak) | 不能飞行(FlyNoWay) | 黑白橡皮颜色 |
.C30097.jpg)
| 表2-14设计模式空间 | ||||
| 目 的 | ||||
| 创建型 | 结构型 | 行为型 | ||
| 范 围 | 类 | (1) | — | (2) |
| 对 象 | (3) | (4) | (5) | |
| 表2-16设计模式空间 | ||||
| 目的 | ||||
| 创建型 | 结构型 | 行为型 | ||
| 范围 | 类 | Factory Method | Adapter(类) | Interpreter Template Method |
| 对象 | Abstract Factory Builder Prototype Singleton | Adapter(对象) Bridge Composite Decorator Facade Flyweight Proxy | Chain of Responsibility Command Iterator Mediator Memento Observer State Strategy Visitor | |