Strategy pattern:
Strategy pattern is an exacting software design pattern in which algorithms can be chosen to implement while in running mode. It is beneficially used in those cases where it becomes needy animatedly to switch the algorithms within the same software. Its main job is to provide or give the understandable meaning to identify a family of algorithms, put each one of them in a nutshell as an object that result them interchangeable. Another job it does is let the algorithms show a discrepancy independently from clients that use them [1].
For example, whenever you want to add, remove, or change any of the performance as such it is a very easy task because each one is its own class. Each of these actions or algorithm encapsulated into its own class is called strategy pattern [2].
References:
[1] http://www.answers.com/strategy%20pattern
[2] http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/StrategyPattern.htm
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment