Difference between the Composition, aggregation, association Relationships.
Now first look into the composition:
To understand the design first of all we must know the relationships. The most important relationships are
Now see the below about each one elaborately.
Association:Association is a relationship where all objects have their own life cycle and there is no owner.
Let’s take an example of Teacher and Student. Multiple students can associate with single teacher and single student can associate with multiple teachers, but there is no ownership between the objects and both have their own life cycle. Both can create and delete independently. This represents the ability of one instance to send a message to another instance. This is typically implemented with a pointer or reference instance variable, although it might also be implemented as a method argument, or the creation of a local variable.