Bird
0
0

In a system where the Order class adds items without checking the Menu, what is the main issue that can occur?

medium📝 Analysis Q14 of 15
LLD - Design — Food Delivery System
In a system where the Order class adds items without checking the Menu, what is the main issue that can occur?
AOrder will reject all items by default
BMenu prices will automatically update in Order
COrder may include items not available in the Menu
DRestaurant will close automatically
Step-by-Step Solution
Solution:
  1. Step 1: Understand the role of validation

    Order should verify items exist in Menu to avoid invalid orders.
  2. Step 2: Identify consequence of missing check

    Without checking, Order can contain items not on Menu, causing errors or confusion.
  3. Final Answer:

    Order may include items not available in the Menu -> Option C
  4. Quick Check:

    Missing validation = invalid items in Order [OK]
Quick Trick: Always check Menu before adding items to Order [OK]
Common Mistakes:
  • Assuming automatic price updates
  • Thinking Order rejects items by default
  • Confusing system behavior with unrelated effects

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes