previous | start | next

## TEMPLATE METHOD Pattern

### Solution

1. Define a superclass that has a method for the algorithm and abstract methods for the primitive operations.
2. Implement the algorithm to call the primitive operations in the appropriate order.
3. Do not define the primitive operations in the superclass, or define them to have appropriate default behavior.
4. Each subclass defines the primitive operations but not the algorithm.

previous | start | next