《设计模式解析》 第17章 Decorate模式 复习题
来源:互联网 发布:ubuntu 移除ppa 编辑:程序博客网 时间:2024/05/21 08:01
《设计模式解析》 第17章 Decorate模式 复习题
Review Questions
Observations
1: What does each Decorator object wrap?
Decorator对象封装的是需要进行功能扩展的组件,该组件与decorator实现了相同的接口或继承了相同的抽象类。
2: What are two classic examples of decorators?
Java 的I/O流。
UI界面添加功能。
Interpretations
1: How does the Decorator pattern help to decompose the problem?
将功能链的动态构建和使用功能的客户分离开来。
2: "The structure is not the pattern." This statement is made during the discussion of the essence of the Decorator pattern. What does this mean? Why is this important?
Opinions and Applications
1: Why do you think the Gang of Four call this pattern "Decorator"? Is it an appropriate name for what it is doing? Why or why not?
挺好的,装饰者,为一个已存在的事物添加一些额外的特性,使之有更强的功能特性。
2: Sometimes people think of patterns as recipes. What is wrong with this?
模式,只有在真正了解了他,并且清楚了他的作用以及适用情况的时候,才能够为问题服务。但并不是所有的问题都能够用模式解决的。
- 《设计模式解析》 第17章 Decorate模式 复习题
- 《设计模式解析》第5章 设计模式简介 复习题
- 《设计模式解析》 第6章 Facade模式 复习题
- 《设计模式解析》 第7章 Adapter模式 复习题
- 《设计模式解析》 第9章 Strategy模式 复习题
- 《设计模式解析》 第10章 Bridge模式 复习题
- 《设计模式解析》 第11章 Abstract Factory 模式 复习题
- 《设计模式解析》 第18章 Observer 模式 复习题
- 《设计模式解析》 第19章 Observer 模式 复习题
- 《设计模式解析》 第23章 Factory Method 模式 复习题
- 《设计模式解析》 第8章 开拓视野 复习题
- 《设计模式解析》 第16章 分析矩阵 复习题
- 《设计模式解析》 第14章 设计模式的原则与策略 复习题
- 《设计模式解析》 第13章 用模式解决CADCAM问题 复习题
- 设计模式练习:Decorate模式
- 设计模式--装饰模式(Decorate)
- 《设计模式解析》 第12章 专家设计之道 复习题
- 《设计模式解析》 第15章 共性与可变性分析 复习题
- 初学代理模式
- Windows核心编程【1】小结
- Hibernate缓存机制
- TNS:Connect timeout occurred
- E. Linear Kingdom Races
- 《设计模式解析》 第17章 Decorate模式 复习题
- access函数使用
- sas做广义估计方程
- OpenCV图像类型转化
- html padding 和 margin
- sql server存储过程实例:统计一段时间内各连续ID的价格合计
- How to Perfectly Uninstall Ad-Aware Free Internet Security
- js location
- 安装openSUSE之后启动XP