-
-
Save jpukg/08525d90ecbdf26e3428 to your computer and use it in GitHub Desktop.
Aggregation vs composition OOP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
simple rule: | |
we have object A and object Z. | |
if we have a pointer from object A to object Z then its aggregation.(no pointing from Z to A ,since it maks a simple relation). | |
if object Z cannot exists in the system without object A, then its composition. | |
its not that hard, even more ITS NOT THAT USEFUL. why? beacuse no body uses this stuff to the fine lines, its a loose model that lets you grasp what you want from the system. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment