Skip to content

speedymonster/design-pattern-strategy

Repository files navigation

Strategy pattern

The Strategy pattern is an alternative to inheritance, if you are thinking about using inheritance to be able to add new behaviors to your objects, it would be convenient to use this pattern

If within your class you make intensive use of the conditional if, else, swicth, case, that means that your class has assigned many behaviors and / or responsibilities, which is usually an indicator of the need to apply the pattern Strategy (strategy) , to be able to encapsulate these behaviors and delegate them to another class or object.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages