Recall & Review
beginner
What is a room type hierarchy in system design?
A room type hierarchy organizes different room categories in a structured way, showing parent-child relationships. It helps manage shared and specific properties efficiently.
Click to reveal answer
beginner
Why use inheritance in a room type hierarchy?
Inheritance allows child room types to reuse common features from parent types, reducing duplication and making the system easier to maintain.
Click to reveal answer
intermediate
How does polymorphism help in a room type hierarchy?
Polymorphism lets the system treat different room types uniformly while allowing each type to behave differently when needed.
Click to reveal answer
intermediate
What is the benefit of using composition over inheritance in room type design?
Composition allows building room types by combining smaller parts or features, offering more flexibility and easier changes than rigid inheritance chains.
Click to reveal answer
advanced
Name a common challenge when designing a room type hierarchy.
One challenge is balancing between too many specific types (which complicate the system) and too few (which reduce flexibility).
Click to reveal answer
What does a room type hierarchy primarily represent?
✗ Incorrect
A room type hierarchy organizes room categories by their relationships, not by lists or schedules.
Which principle helps avoid repeating common room features in multiple types?
✗ Incorrect
Inheritance allows sharing common features from parent to child room types.
What is a downside of deep inheritance in room type hierarchies?
✗ Incorrect
Deep inheritance can make the system rigid and difficult to modify.
Which design approach allows combining features to build room types?
✗ Incorrect
Composition builds complex types by combining smaller parts or features.
Polymorphism in room types allows:
✗ Incorrect
Polymorphism lets different room types respond differently while using the same interface.
Explain how you would design a room type hierarchy for a hotel system.
Think about shared features like size or amenities and specific ones like suite or deluxe.
You got /4 concepts.
What are the advantages and disadvantages of using inheritance in room type hierarchies?
Consider how inheritance helps and when it might cause problems.
You got /4 concepts.