Card 6 / 8: What are the differences/similarities between an aggregation and a composition?
A)
both represent a subclassing relationship
B)
both represent an ownership relationship
C)
aggregation is stronger than composition in terms of life cycle dependency between the involved classes
D)
in a composition relationship, deleting the instance of the owner (container) class would result in deletion of the instances of the contained class
Answer:
B) both represent an ownership relationship
D) in a composition relationship, deleting the instance of the owner (container) class would result in deletion of the instances of the contained class
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|