Definition : define the skeleton of an algorithm in a a method, deferring some steps to subclasses. Template Method pattern lets subclasses redefine certain steps of an algorithms without changing the algorithm's structure. Class diagram: The OO Principles: - The Hollywood Principles: Dont call us, we'll call you. The template method in supper class tell the subclasses that, dont call us, we'll call you. The supper class is on high level component, it has control over the algorithm, and call the subclasses only when they're need for an implementation of template method. The client will depend on the abstraction supper class rather than the concrete subclasses, which reduce the dependencies of overall system. Advantages: - There is no code duplication. (the reusable code is pulled to the parent class) - Flexibility lets subclasses decide how to implement steps in an algorithm. Disadvantages: - Difficult for debug and maintenance. Relation with other ...