What is the key difference between the Strategy and Template Method patterns?
-
A
Strategy uses inheritance; Template Method uses composition
-
B
Strategy changes the whole algorithm; Template Method changes only steps
-
C
Strategy works at compile time; Template Method works at runtime
-
D
Strategy is structural; Template Method is creational