Bird
0
0

Why is it important to keep the Loan class separate from the Book and Member classes in a library system?

hard🧠 Conceptual Q10 of 15
LLD - Design — Library Management System
Why is it important to keep the Loan class separate from the Book and Member classes in a library system?
ATo maintain clear responsibilities and allow independent changes
BBecause Loan class stores all book and member data
CTo reduce the number of classes in the system
DBecause Book and Member classes cannot have methods
Step-by-Step Solution
Solution:
  1. Step 1: Understand class separation benefits

    Separating classes helps keep each focused on a single responsibility, making maintenance easier.
  2. Step 2: Recognize independence of changes

    Changes in Loan logic won't affect Book or Member classes directly, reducing bugs and complexity.
  3. Final Answer:

    To maintain clear responsibilities and allow independent changes -> Option A
  4. Quick Check:

    Separation of concerns improves maintainability [OK]
Quick Trick: Separate classes for clear roles and easier updates [OK]
Common Mistakes:
MISTAKES
  • Thinking Loan stores all data
  • Trying to reduce classes unnecessarily
  • Believing Book/Member can't have methods

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes