Strategy Pattern:
- Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
- All the algorithm will be independently and will share a common Base class.
- There will be a “has-a” relationship between the implementing and algorithm base class.
- There will be a Strategy set method or Custom constructor to set the strategy algorithm that will be used by the implementing class.
WIP …
Advertisement
June 10, 2011 at 11:22 AM
It would be better if examples were there.