Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 477 Bytes

File metadata and controls

8 lines (6 loc) · 477 Bytes

Task 1/1: Strategy Pattern – Theory

The Strategy is a behavioral pattern that allows you to define a family of algorithms, encapsulate each algorithm, and make them interchangeable. This pattern enables you to choose an appropriate algorithm at runtime without affecting the client code that uses it.

When to apply the Strategy pattern?
Apply the Strategy pattern when you have multiple algorithms or strategies that can be used interchangeably within a class.