A Bridge Pattern says that just "decouple the functional abstraction from the implementation so that the two can vary independently".
The Bridge Pattern is also known as Handle or Body.
Advantage of Bridge Pattern
Usage of Bridge Pattern
Example of Bridge Pattern
The UML given below describes the example of bridge pattern.
UML for Bridge Pattern:
Implementation of above UML:
Create a Question interface that provides the navigation from one question to another or vice-versa.
Create a JavaQuestions implementation class that will implement Question interface.
Create a QuestionManager class that will use Question interface which will act as a bridge..
Create a QuestionFormat class that will extend the QuestionManager class
Create a BridgePatternDemo class.