Which of the following are true about the Bridge and Adapter patterns?
Reveal answer
Fill a bubble to check yourself
Which of the following are true about the Bridge and Adapter patterns?
The Adapter pattern implements an interface known to its clients and provides an instance of a class not known to its clients.
The Bridge pattern implements an interface known to its clients and provides an instance of a class not known to its clients.
The Adapter pattern creates a separation between abstractions and classes that implement those abstractions.
The Bridge pattern creates a separation between abstractions and classes that implement those abstractions.
Adapter wraps an incompatible class to match an expected interface, making unrelated classes work together. Bridge separates abstraction from implementation so both can vary independently. Adapter is about making incompatible interfaces compatible after-the-fact, while Bridge prevents permanent binding between abstraction and implementation.