Bird
0
0

Which of the following is the correct way to represent a hold object in a reservation system?

easy🧠 Conceptual Q3 of 15
LLD - Design — Library Management System
Which of the following is the correct way to represent a hold object in a reservation system?
AHold { hold_id: string, item_id: string, user_id: string, expiry_time: datetime }
BHold { item_name: string, price: float, quantity: int }
CHold { user_name: string, payment_status: boolean }
DHold { reservation_date: datetime, confirmation_code: string }
Step-by-Step Solution
Solution:
  1. Step 1: Identify necessary hold fields

    A hold needs an ID, the item it blocks, the user who holds it, and expiry time.
  2. Step 2: Match fields to options

    Hold { hold_id: string, item_id: string, user_id: string, expiry_time: datetime } correctly includes hold_id, item_id, user_id, and expiry_time.
  3. Final Answer:

    Hold { hold_id: string, item_id: string, user_id: string, expiry_time: datetime } -> Option A
  4. Quick Check:

    Hold object fields = ID, item, user, expiry [OK]
Quick Trick: Hold object must track expiry and user info [OK]
Common Mistakes:
MISTAKES
  • Confusing hold with reservation fields
  • Missing expiry_time in hold object
  • Using irrelevant fields like payment_status

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes