Brief Overview:

|
Sometimes referred to as the Policy Pattern. It allows the selection of a
particular algorithm to accomplish some task at run time. Which implies that the
current state of the object can determine which algorithm it uses and allow it to
dynamically change that algorithm at run time. This is most easily accomplished
by separating the algorithms into a separate classes from the object and having a
reference (pointer) to the appropriate algorithm. If all the algorithm classes are
subclasses of the same parent then the object can contain a pointer to the parent
class and set it pointing to any of the subclass algorithm implementations.
|