Definition
|
UML class diagram
Participants
The classes and/or objects participating in this pattern are:
|
| Sample code in C# | download C# source code zip file |
This structural code demonstrates the Strategy pattern which encapsulates functionality in the form of an object. This allows clients to dynamically change algorithmic strategies.
This real-world code demonstrates the Strategy pattern which encapsulates sorting algorithms in the form of sorting objects. This allows clients to dynamically change sorting strategies including Quicksort, Shellsort, and Mergesort.
|

1109



被折叠的 条评论
为什么被折叠?



