Bird
0
0

You have a large software project with many modules. To improve maintainability, you want to apply the SOLID principles. Which combination of actions best reflects applying these principles together?

hard📝 Application Q8 of 15
Software Engineering - Fundamentals
You have a large software project with many modules. To improve maintainability, you want to apply the SOLID principles. Which combination of actions best reflects applying these principles together?
ASplit classes to have single responsibilities, depend on interfaces, and keep modules open for extension
BWrite one large class with many functions, tightly couple modules, and modify existing code often
CAvoid interfaces, repeat code for clarity, and keep all modules closed for extension
DIgnore dependencies, write complex functions, and add features without planning
Step-by-Step Solution
Solution:
  1. Step 1: Recall SOLID principles

    SOLID promotes single responsibility, dependency inversion, open/closed, and other good design practices.
  2. Step 2: Match actions to principles

    Splitting classes, using interfaces, and allowing extension without modification align with SOLID.
  3. Final Answer:

    Split classes to have single responsibilities, depend on interfaces, and keep modules open for extension -> Option A
  4. Quick Check:

    SOLID = single responsibility + interfaces + open/closed [OK]
Quick Trick: SOLID means small, flexible, and loosely coupled code [OK]
Common Mistakes:
  • Choosing large classes
  • Ignoring interfaces
  • Modifying code instead of extending

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Software Engineering Quizzes