QuizzesDesign a Hotel Management System — Concept Check
intermediate
lld

Design a Hotel Management System — Concept Check

Questions on Design a Hotel Management System. Model a hotel that manages room types, bookings, guest check-in/check-out, and invoice generation using Strategy and Observer patterns.

8 minutes 8 questions Pass at 70%
Time Limit
8 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on Design a Hotel Management System — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A hotel guest checks out, and the housekeeping staff is notified to clean the room. Which design pattern is used to implement this notification?

    • AStrategy pattern
    • BObserver pattern
    • CFactory pattern
    • DSingleton pattern
  2. 2.A hotel uses a different pricing strategy during peak season. How is this achieved in the system?

    • ABy updating the RoomStatus
    • BBy changing the RoomType enum
    • CBy implementing a new PricingStrategy
    • DBy modifying the Booking class
  3. 3.What happens if a guest tries to book a room during maintenance?

    • ARoom is booked and status changes to OCCUPIED
    • BBooking fails due to room status
    • CRoom is booked and status changes to BOOKED
    • DBooking succeeds but room remains in MAINTENANCE
  4. 4.A developer wants to add a new room type without changing existing room creation logic. Which pattern should they use?

    • ADecorator pattern
    • BObserver pattern
    • CStrategy pattern
    • DFactory pattern
  5. 5.If a room is booked but not yet checked in, what is its status?

    • ABOOKED
    • BAVAILABLE
    • COCCUPIED
    • DMAINTENANCE
  6. 6.Why might a developer mistakenly think they need to modify the Booking class to change pricing rules?

    • AThey confuse RoomType with PricingStrategy
    • BThey think pricing is hardcoded in Booking
    • CThey don't understand the Strategy pattern
    • DThey believe Booking handles all logic
  7. 7.A guest checks into a room. What is the new status of the room?

    • AMAINTENANCE
    • BAVAILABLE
    • CBOOKED
    • DOCCUPIED
  8. 8.How does the system ensure room status transitions are safe under concurrent access?

    • ABy using atomic variables
    • BBy using synchronized methods
    • CBy relying on database transactions
    • DBy implementing a lock mechanism