[Tutor] Aggregation vs Composition

jia yue Kee jiayue93 at gmail.com
Sun Dec 10 00:07:00 EST 2017

Good Day All,

I am new to Python and I came across the concept of Composition and
Aggregation the other day in Dusty Philips's Python 3: Object-Oriented
Programming book.

Based on my reading, what I gathered was that Composition implies a
relationship where the child cannot exist independent of the parent while
Aggregation, on the other hand, implies a relationship where the child can
exist independently of the parent.

However, in one of the paragraph of the book, *Dusty mentioned that
composition is aggregation* (refer to the snapshot below, the sentence
which has been highlighted in yellow). I am really confused by this
statement and I appreciate that if someone could enlighten me on this as I
do not really see how aggregation can be equivalent to composition if the
child in one case can exist independently while the other could not exist
independently of the parent.

[image: Inline image 1]

Thanks and Regards,

More information about the Tutor mailing list