Referring to an Image I found online. It labels Composition as a subset of Aggregation. As per my understanding Composition is a form of tight coupling like when we instantiate an object inside another object. While Aggregation is a form of loose coupling kind of like a Dependancy Injection. They both seem different so why would Composition be a subset of Aggregation?
Image: https://algodaily.com/lessons/association-aggregation-composition-casting
Aucun commentaire:
Enregistrer un commentaire