26.4k views
3 votes
___________ represents the whole/part relationship between classes. In __________, the parts of a class have the same lifespan as their owner.

Select one:
a. Composition / composition
b. Association / association
c. Aggregation / aggregation
d. Inheritance / inheritance

1 Answer

0 votes

Final answer:

Composition is the term that represents the whole/part relationship where parts are strictly bound to the lifecycle of the owning object in object-oriented programming.

Step-by-step explanation:

Composition represents the whole/part relationship between classes. In composition, the parts of a class have the same lifespan as their owner.

This is an important concept in object-oriented programming, illustrating a strong form of association known as a 'has-a' relationship.'

When a composition exists between two objects, if the owning object is destroyed, then the composed objects are also destroyed, implying a strong life-cycle dependency.

User Aymeric
by
7.8k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.