Template method

Template method – Definition

Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm’s structure.

Gang of four (Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides)

Template method – Struktur

Template method – Code Beispiel

Die Code-Beispiele sind jeweils bei github zu finden.