Object‐Oriented Programming (OOP) Practice Test

Access More Questions
What should you do with 'fat' interfaces?
Correct Answer:
Expose them through adapters
Explanation:
A fat interface packs many methods into one contract, which makes every client depend on more functionality than it actually needs. Exposing that interface through adapters is a practical way to give each client a lean, tailored surface while keeping the heavy interface intact behind the scenes. The adapter translates the smaller, client-focused calls into the appropriate calls on the fat interface, so clients don’t have to learn or depend on all those methods. This approach preserves backward compatibility with existing code, localizes changes to the adapter, and makes it easier to evolve the underlying API over time. In contexts where you can’t or don’t want to refactor the interface itself, using adapters provides a clean separation between what a client uses and how the system implements the fat interface. Splitting into smaller interfaces is another valid strategy in many cases, but adapters specifically address the need to present a usable surface without forcing a broad redesign.

Access more questions from this quiz

Continue to Object‐Oriented Programming (OOP) Practice Test for more practice questions and the full quiz experience.

Access More Questions