Bird
0
0

Which class is best suited to store customer booking dates and payment details?

easy📝 Conceptual Q2 of 15
LLD - Design — Hotel Booking System
Which class is best suited to store customer booking dates and payment details?
ABooking class
BRoom class
CHotel class
DCustomer class
Step-by-Step Solution
Solution:
  1. Step 1: Identify data related to bookings

    Booking dates and payment details are specific to each reservation made by a customer.
  2. Step 2: Match data to class responsibility

    The Booking class manages reservation details including dates and payments, unlike Room or Hotel classes.
  3. Final Answer:

    Booking class -> Option A
  4. Quick Check:

    Booking info = Booking class [OK]
Quick Trick: Booking class holds reservation and payment info [OK]
Common Mistakes:
  • Storing booking dates in Room class
  • Putting payment details in Hotel class
  • Confusing Customer class with Booking class

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes