← Quiz: Design Patterns: all 10 questions
Quiz: Design Patterns · Question 4 of 10
Your code expects send(phone, text) but a vendor library offers pushmessage(payload). Which pattern connects them?
Your code expects send(phone, text) but a vendor library offers push_message(payload). Which pattern connects them?
- A.Builder
- B.Adapter
- C.Strategy
- D.Singleton
Answer & explanation
Correct answer: Adapter
An adapter converts one interface into the one your code expects.
Can you get the rest right without peeking?
Take the timed Quiz: Design Patterns quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →