Template Method

xiaoxiao2021-03-06  54

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..

转载请注明原文地址:https://www.9cbs.com/read-116247.html

New Post(0)