Design Pattern Series 1 : Strategy Pattern

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

One Response to “Design Pattern Series 1 : Strategy Pattern”

  1. juthekalahiry Says:

    It would be better if examples were there.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 34 other followers