| Start |
|---|
| Adapter Design Pattern [**“Adapter”**](https://en.wikipedia.org/wiki/Adapter_pattern) as the name suggests is the object which lets two mutually incompatible interfaces communicate with each other. **For example:** if you buy a Iphone 8 (or any other Apple product) you need alot of adapters. Because the default interface does not support audio jac or USB. With these adapters you can use earphones with wires or you can use a normal Ethernet cable. So **"two mutually incompatible interfaces communicate with each other"**. **So in technical terms this means:** Convert the interface of a class into another interface that a clients expect. Adapter let classes work together that couldn't otherwise because of incompatible interfaces. The classes and objects participating in this pattern are: The adapter pattern exits out 4 elements
UML First code Example (Theoretical example). Second code example (Real world imlementation) When to use |
Read Article
https://develop.horje.com/learn/1434/reference