Multiple choice

Which of the following statements is true about composition in object oriented programming?

  1. It determines the relationship between the two objects such as one-to-one, one-to-many etc.

  2. It determines the complexity of the objects after combining them.

  3. It determines the relationship between the objects in a directional line and shows the has-a relationship.

  4. It hides the implementation details of the system.

  5. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This is true about composition and it is the more restrictive form of aggregation.