UML Class Diagrams — Concept Check
Questions on UML Class Diagrams. Learn UML class diagram notation — association, aggregation, composition, inheritance, and realization — with Java code equivalents for each relationship.
Questions in this quiz
8 questions on UML Class Diagrams — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.In a UML class diagram, which relationship is represented by a filled diamond?
- AAggregation
- BAssociation
- CInheritance
- DComposition
2.A Library class holds a list of Book objects in a UML diagram. Which relationship does this represent?
- AInheritance
- BRealization
- CComposition
- DAggregation
3.A House object is destroyed, and all its Room objects are also destroyed. What relationship does this describe?
- ARealization
- BAggregation
- CAssociation
- DComposition
4.Which UML relationship is incorrectly assumed to mean that the child can exist independently of the parent?
- ARealization
- BComposition
- CInheritance
- DAggregation
5.A UML class diagram shows a Driver using a Car. What type of relationship does this represent?
- AAssociation
- BInheritance
- CComposition
- DAggregation
6.Which relationship is often mistakenly thought to involve a solid line with an open arrowhead in UML diagrams?
- AAssociation
- BRealization
- CComposition
- DAggregation
7.A Dog class extends an Animal class in Java. How is this represented in UML?
- AInheritance
- BAggregation
- CAssociation
- DComposition
8.What does the multiplicity notation 1..* mean in a UML class diagram?
- AOne or more
- BExactly one
- CZero or more
- DZero or one