Https://en.wikipedia.org/wiki/Adapter_pattern
It allows the interface of an existing class to be used as another interface.
It is often used to make existing classes work with others without modifying their source code.
Scenario: let an existing class work correctly based on other classes, and do not need to modify their source code.
Example: Notebook power Adapter (Adapter), so that the notebook (client) work properly, using AC (adaptee), do not modify the notebook or modify the AC.
UML Class Diagrams:
That is
The client class has a target member variable (eventually upward transformation, referring to an instance of the implementation class adapter)
The target interface has the request () method
The adapter class has a Adaptee member variable
The adapter class is the implementation class of the target interface, implementing the request () method, calling the Specificrequest () method of the Adaptee class in the method body
Summary: No change to client, no change to adaptee.
Interface Implementation Class
Adapter mode (Adapter pattern)