Multiple choice

What is an aggregate object?

  1. An object with only primitive attributes

  2. An instance of a class which has only static methods

  3. An instance which has other objects

  4. None of the above

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

An aggregate object is an object that contains or references other objects as part of its state. This represents a 'has-a' relationship (composition/aggregation). For example, a Car object might contain Engine, Wheel, and Seat objects. This is different from an object having only primitive attributes or only static methods.