Το Template Method pattern ορίζει το σκελετό ενός αλγορίθμου σε μια βάση κλάσης, επιτρέποντας στις υποκλάσες να συμπληρώσουν συγκεκριμένα βήματα χωρίς να αλλάξουν τη συνολική δομή. Καταγράφει μια κοινή διαδικασία ενώ επιτρέπει την προσαρμογή των επιμέρους βημάτων.
Τι κάνει το Template Method pattern
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"
