Open main menu

CDOT Wiki β

Changes

Adapter

216 bytes added, 19:05, 25 February 2007
Adapter Design Pattern
A good analogy for the Adapter pattern would be the adapter's commonly used to convert the voltage of Canadian/U.S made appliances to be used in different countries. In this case, the appliance ('''Target''') is using the adapter ('''Adapter''') to reuse the socket ('''Adaptee''') already in place.
 
There are two specific types of adapter patterns - object adapter pattern and class adapter pattern. The latter uses multiple inheritance whereas the former uses an instance of the reuseable class it wants to adapt
== Object Adapter Pattern ==
1
edit