Bird
0
0

In a test, the game view shows incorrect data after model changes. Which fix aligns with model-view separation principles?

medium📝 Analysis Q7 of 15
LLD - Design — Tic-Tac-Toe Game
In a test, the game view shows incorrect data after model changes. Which fix aligns with model-view separation principles?
ARemove the view and use console logs
BCombine model and view into one class
CTrigger view update only after model changes complete
DUpdate the model less frequently
Step-by-Step Solution
Solution:
  1. Step 1: Identify cause of incorrect view data and apply correct update strategy

    View showing wrong data means it updates before or without model changes. Triggering view update after model changes ensures view shows current data.
  2. Final Answer:

    Trigger view update only after model changes complete -> Option C
  3. Quick Check:

    Update view after model changes = Correct fix [OK]
Quick Trick: Update view after model changes finish [OK]
Common Mistakes:
MISTAKES
  • Merging model and view breaks separation
  • Removing view loses user interface
  • Reducing model updates hides problems

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes