SPIRO THE TECH GURU

Back

When use Aggregation?

By Admin on

  • Code reuse is also best achieved by aggregation when there is no is-a relationship.
  • Inheritance should be used only if the relationship is-a is maintained throughout the lifetime of the objects involved; otherwise, aggregation is the best choice.
SPIRO Google Plus