The Strategy design pattern solves problems like:
How can a class be configured with an algorithm at run-time
instead of implementing an algorithm directly?
How can an algorithm be selected and exchanged at run-time?
See Applicability section for all problems Strategy can solve.
See Solution section for how Strategy solves the problems.
Context)
that requires (uses) the algorithm.
Conditional statements
(switch(…))
are needed to switch between different algorithms.