The 'Gang of Four' Companion:

Strategy Design Pattern

Formal specification of design patterns in LePUS3 and Class-Z

Print this document

This page is part of the The 'Gang of Four' Companion dedicated to the formal specification in LePUS3 and Class-Z of patterns from the 'Gang of Four' catalogue [Gamma et al 1995].



The Strategy design motif

The informal description: Excerpts from [Gamma et al. 1995] (adapted for this purpose):

Intent: Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.

Structure: Original OMT diagram converted to UML (Why and How?):

Strategy in UML



Formal specification

See also:

Strategy in LePUS3
Strategy in LePUS3 (legend)
Strategy in Class-Z (legend)