Bird
Raised Fist0

Which of the following statements about the Interface Segregation Principle (ISP) is INCORRECT?

medium🐞 Bug Identification Q14 of Q15
OOP & Design Patterns - Interface Segregation & Dependency Inversion - Fat Interfaces & IoC
Which of the following statements about the Interface Segregation Principle (ISP) is INCORRECT?
AISP aims to reduce the number of interfaces to simplify the system.
BClients should only depend on the interfaces that are relevant to them.
CISP encourages creating multiple specific interfaces rather than one general-purpose interface.
DISP helps avoid forcing clients to implement methods they do not use.
Step-by-Step Solution
  1. Step 1: Recall ISP's core principle

    ISP promotes splitting interfaces so clients depend only on what they need, often increasing interface count.
  2. Step 2: Analyze options

    ISP aims to reduce the number of interfaces to simplify the system. incorrectly states ISP reduces the number of interfaces; in reality, it often increases them to avoid fat interfaces. Options A, B, and D correctly describe ISP goals.
  3. Final Answer:

    Option A -> Option A
  4. Quick Check:

    ISP is about interface granularity, not minimizing interface count.
Quick Trick: ISP splits interfaces; it doesn't minimize their count.
Common Mistakes:
MISTAKES
  • Confusing ISP with interface minimization
  • Assuming fewer interfaces always mean better design
  • Ignoring client-specific interface needs
Trap Explanation:
PITFALL
  • Option B sounds like a simplification but aligns with ISP's goal of avoiding fat interfaces by splitting them.
Interviewer Note:
CONTEXT
  • Tests candidate's ability to spot misconceptions about ISP.
Master "Interface Segregation & Dependency Inversion - Fat Interfaces & IoC" in OOP & Design Patterns

2 interactive learning modes - each teaches the same concept differently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More OOP & Design Patterns Quizzes