Adapter Flashcards
1
Q
Intent
A
Convert the interface of a class into another interface client expects.
2
Q
Adapter lets classes work together that couldn’t otherwise because of ___________
A
incompatible interfaces
3
Q
AKA
A
Wrapper
4
Q
Use Adapter when you want to create a reusable class that cooperates with __________ or __________ classes that don’t have __________ interfaces.
A
unrelated, unforseen, incompatible
5
Q
Participants
A
- Target
- defines the domain-specific interface
- Client
- collaborates with objects conforming to the Target interface
- Adaptee
- defines an existing interface that needs adapting
- Adapter
- adapts the Adaptee to conform to Target interface
6
Q
A