InterviewSolution
| 1. |
What is a Bridge Design Pattern? |
|
Answer» The bridge pattern is a type of structural design pattern that lets to split large class or closely related classes into 2 hierarchies - abstraction and IMPLEMENTATION. These hierarchies are independent of each other and are used whenever we need to decouple an abstraction from implementation. This is called a Bridge pattern because it acts as a bridge between the abstract class and the implementation class. In this pattern, the abstract classes and the implementation classes can be altered or MODIFIED independently without affecting the other one. The above image is the UML representation of the Bridge Pattern. There are 4 main elements of Bridge Pattern. They are:
|
|