Il-patern Template Method jiddefinixi l-iskeletru ta' algoritmu f'klassi bażi, u jħalli s-subklassi jimplimentaw passi speċifiċi mingħajr ma jbiddlu l-istruttura ġenerali. Jaqbad proċess komuni filwaqt li jippermetti l-personalizzazzjoni ta' passi individwali.
X'jagħmel il-patern Template Method
TEMPLATE METHOD → define an algorithm's overall STRUCTURE in a base method, with some STEPS
left for subclasses to implement:
→ the base class controls the overall flow (the "template")
→ subclasses override specific STEPS (the parts that vary)
→ the algorithm's structure is FIXED; the steps are customizable
→ "common process, customizable steps"
