Adapter Flashcards

1
Q

Intent

A

Convert the interface of a class into another interface client expects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Adapter lets classes work together that couldn’t otherwise because of ___________

A

incompatible interfaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

AKA

A

Wrapper

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly