Recall & Review
beginner
What is inheritance in system design?
Inheritance allows a new component or class to reuse properties and behaviors of an existing one, promoting code reuse and easier maintenance.Click to reveal answer
beginner
What does an interface represent in system design?
An interface defines a contract of methods or behaviors that a component must implement, without specifying how these methods work internally.
Click to reveal answer
intermediate
How is inheritance typically shown in diagrams?
Inheritance is shown with a solid line and a hollow arrow pointing from the child (subclass) to the parent (superclass).
Click to reveal answer
intermediate
How is interface implementation shown in diagrams?
Interface implementation is shown with a dashed line and a hollow arrow pointing from the implementing class to the interface.Click to reveal answer
advanced
Why use interfaces instead of inheritance?
Interfaces allow different components to share common behaviors without forcing a class hierarchy, enabling more flexible and decoupled designs.Click to reveal answer
Which notation represents inheritance in UML diagrams?
✗ Incorrect
Inheritance is shown with a solid line and a hollow arrow pointing to the parent class.
What does an interface specify?
✗ Incorrect
Interfaces specify a contract of methods that must be implemented, without defining internal workings.
Which line style shows interface implementation?
✗ Incorrect
Interface implementation is shown with a dashed line and a hollow arrow.
Inheritance promotes which of the following?
✗ Incorrect
Inheritance allows reuse of code by sharing properties and behaviors from parent to child.
Why might you prefer interfaces over inheritance?
✗ Incorrect
Interfaces allow different classes to share behaviors without being forced into a class hierarchy.
Explain how inheritance and interface notation differ in system design diagrams.
Think about the line style and arrow type used in UML.
You got /4 concepts.
Describe why interfaces are important in designing flexible systems compared to inheritance.
Consider how interfaces help avoid rigid class structures.
You got /4 concepts.