CSDN博客

img wangjiong

Template Method

发表于2004/9/16 17:19:00  630人阅读

分类: Design Patterns

Benefit:
• The Template Method pattern is a very common technique for reusing code.

Applicable Scenarios:
• You want to implement the nonvarying parts of an algorithm in a single class and the varying parts of the algorithm in subclasses.
• Common behavior among subclasses should be moved to a single common class, avoiding duplication.

阅读全文
0 0

相关文章推荐

img
取 消
img