Bird
Raised Fist0

When strictly enforcing the Single Responsibility Principle in a large application, what is a common drawback developers might face?

medium💡 Conceptual Thinking Q5 of Q15
OOP & Design Patterns - Single Responsibility Principle - One Class, One Reason to Change
When strictly enforcing the Single Responsibility Principle in a large application, what is a common drawback developers might face?
AIncreased number of classes leading to higher system complexity.
BReduced code readability due to combining multiple responsibilities.
CDifficulty in identifying distinct responsibilities within classes.
DDecreased modularity making testing harder.
Step-by-Step Solution
Solution:
  1. Step 1: Understand SRP impact

    SRP encourages splitting classes by responsibility.
  2. Step 2: Consider large codebases

    Strict SRP leads to many small classes.
  3. Step 3: Identify drawback

    More classes can increase overall system complexity and management overhead.
  4. Final Answer:

    Option A -> Option A
  5. Quick Check:

    More classes can complicate architecture [OK]
Quick Trick: More classes can mean more complexity [OK]
Common Mistakes:
MISTAKES
  • Thinking SRP reduces modularity
  • Assuming SRP decreases readability
  • Believing SRP makes testing harder
Trap Explanation:
PITFALL
  • Option B is incorrect because SRP improves readability by separating concerns.
Interviewer Note:
CONTEXT
  • Evaluates awareness of practical trade-offs when applying SRP.
Master "Single Responsibility Principle - One Class, One Reason to Change" 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