Strategy
Directory actions
More options
Directory actions
More options
Strategy
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Define: The strategy pattern (also known as the policy pattern) is a software design pattern, whereby an algorithm's behaviour can be selected at runtime. The strategy pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Intent: Encapsulates a family of related object or algorithms Lets the algorithm vary and evolve separate from the clients Allow classes to maintain a single purpose Applicability Switch statements are red flags Adding additional functionality forces you to modify an existing class