Software Design Patterns and Principles - Part 7 (Adapter Design Pattern)
Other Parts of This Series: Part 6: Software Design Patterns and Principles - Part 6 (Builder Design Pattern) Adapter Design Pattern (Photo Credit: Refactoring.guru) In this series, we try to explore software design patterns and principles. We will try to learn the well-known OOP design patterns one by one. In this part, we try to explore the adapter design pattern. So let’s get started… Story My friend Sabbir was so frustrated with his life some days ago. Because everywhere, everything he faced was disturbing and not in favor of him. For example, he visits a country where all the sockets are 2-pin for charging electric devices, but his laptop and phone charger need 3-pin sockets. Another case was that he wants to connect a printer, and the port is USB 3.0 type, but his laptop supports only Type-C style cable. Also, another most frustrating scenario was the language barrier problem. His language was not understandable by others, and he also didn’t understand the local people. In these types of situations, he wanted to adapt the cases carefully. He adapts and makes his life happy. ...