The “part-whole”, or “a-part-of”, relationship in which objects representing…

2014

The “part-whole”, or “a-part-of”, relationship in which objects representing the components of something associated with an object representing the entire assembly is called as

  1. A.

    Association

  2. B.

    Aggregation

  3. C.

    Encapsulation

  4. D.

    Generalisation

Attempted by 259 students.

Show answer & explanation

Correct answer: B

Correct answer: Aggregation

Explanation: Aggregation represents the part–whole (a-part-of) relationship where objects representing components are associated with an object representing the entire assembly. In aggregation, the parts can usually exist independently of the whole.

  • Definition: Aggregation is a weak whole–part relationship; parts are linked to the whole but have independent lifecycles.

  • Example: A classroom (whole) and students (parts). Students can exist outside the classroom, so this is aggregation rather than composition.

  • Contrast with other terms:

  • Association is any relationship between objects and does not necessarily imply a part–whole structure.

  • Composition is a stronger form of part–whole where parts typically cannot exist independently of the whole (dependent lifecycle).

  • Encapsulation relates to hiding internal state; generalisation (inheritance) expresses an is-a relationship. Neither describes part–whole.

Explore the full course: Mppsc Assistant Professor