Adapter Pattern
Definition-Converts the interface of a class into another interface clients expect. Lets classes work together that couldn’t otherwise because of incompatible interfaces.
How to use?
1. The client makes a request to the adapter by calling a method on it using the target interface.
2. The Adapter translates that request into one or more calls on the adaptee(target objects proceeding requests) using the Adaptee interface.
3. The client receives the results of the call and never knows there is an adapter doing translation.
How to implement this approach (runtime behavior)?
Advantage: decouple the client from implemented interface, and if we expect the interface to change over time, the adapter encapsulates that change so that the client doesn’t have to be modified each time.
Example:Notebook and its ACPower Voltage



















































































//If u have anything interesting, pls contact with me. QQ:95491590