online-example Adapter By online-example

UML model

According to Freeman in "Head first design patterns", the Adapter pattern is a design pattern that translates one interface for a class into a compatible interface. An adaptor allows classes to work together that normally could not because of incompatible interfaces. The adapter provides its interface to clients while using the original interface. In this class model illustrating the pattern, the Client cannot directly access to Adaptee.methodB(). It uses the adaptor by calling methodA() and the adaptor translates it by calling methodB().

Updated on
1 diagrams