Skip to content

QuizNot attempted

Adapter vs facade vs proxy

Match: "make an old API's response shape fit our types" · "one startCar() that calls fuel, battery and engine checks" · "intercept property access for validation or caching".
1–4 to choose, Enter to submit
Show answer & explanation

Correct answer:

  • Adapter · Facade · Proxy
  • Reshaping an old API to fit our types converts an interface (Adapter)
  • one startCar() over fuel, battery and engine simplifies a subsystem (Facade)
  • intercepting property access controls access to an object (Proxy).
  • Not Facade · Adapter · Proxy: the first two are swapped.
  • Not Proxy · Facade · Adapter: reshaping data isn't access control, and interception isn't conversion.
  • Not Adapter · Proxy · Facade: a single entry point over many calls isn't a stand-in object.