Skip to Content

What is Adapter Design Pattern: A brief explanation

What is Adapter Design Pattern: A brief explanation

Submitted by • May 2, 2020

What is Adapter Design Pattern? Adapter Design Pattern is a structural design pattern that can somewhat be compared to real-life problems we face with plugs. Before we roll out the definition, let us think of a real-life example. If you have ever travelled and stopped by a hotel you might have needed an extra adapter to plug your phone’s or laptop’s charger into the hotel’s wall outlet. This especially happens when you travel to a foreign nation. So, what are the adapters? Adapters are connectors that change the plug shape to match the electrical outlet. This is exactly what the adapter design pattern does. The adapter design pattern’s purpose is to lay down criteria that make classes work together that could not otherwise because of incompatible interfaces. The intent is to convert the interface of one class into another interface so that it becomes compatible with what the client expects. The adapter is also known as wrapper. Let us see, what is adapter design pattern?

Voted by:
Voted by decipherzone

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>