In program design, a template that provides a general solution to a common problem that recurs in different forms and contexts. The term is mainly used in object-oriented programming. In practice, many different program designs present some common characteristics; for example, the classes involved in the designs may play similar roles, have similar attributes, or their relations may present some given general form. A design pattern is generally given a name accompanied by a description of the classes involved and of their relations or interactions. Many design patterns have been identified and documented, and whether or not to use them is a decision for the program designer.