Object Oriented programming ( OOP ) :- What is Aggregation , Association and Composition ?


For more such videos visit
For more such videos subscribe

See our other Step by Step video series below :-
Learn C# Step by Step
Learn Design Pattern Step by Step:-
Learn Angular tutorial step by step
Learn MVC Core step by step :-
Learn Azure Step by Step :-
Learn SharePoint Step by Step in 8 hours:-
Python Tutorial for Beginners:-
Learn Data Science in 1 hour :-
Learn Power BI Step by Step:-
Learn MSBI Step by Step in 32 hours:-
Learn Tableau step by step :-
Learn SQL Server Step by Step

In this video we will demonstrate 3 important principles i.e. Aggregation , Association and Composition using c#. All the 3 things are important pillars of OOP ( object oriented programming) relationship.



  1. i've been googling for hours and still didnt understand the concept until i found this video THANK YOU. I have a midterm tomorrow wish me luck

  2. 1)Inheritance Relationship
    Is-A (Parent-Child) Manager (is a) Employee.
    2) Association Relationship
    Has-A(Own Life Time | Exists Independently/Isolation) Manager has a Swipe Card.
    3) Aggregation Relationship
    Has-A(Ownership | Single owner of Child Object | Child Objects can exists Independently) One Manager – Many Workers.
    4) Composition Relationship (Objects depend on each other | Life Time Of both Objects is same) Salary depends on Managers Productivity.

    Thanks for explanations Sir.

  3. How is that there was no compilation error with C#? There was no forward referencing of Card class. Does C# takes care of forward referencing?

  4. i find this very abstract and sometimes very philosophical. This is kind of open ended interpretation. Is there a clear right or wrong to the interpretation how objects interact each other?

  5. Nice video on UML relation. Can u clarify the difference of composition and dependency relationship, the 4 & 5 point are dependent relation i assume

  6. best example for composition is Home and Rooms. Home is coposed of rooms. Rooms dont exist independently. Room needs Home for its existance and Home needs Rooms to be a greate Home. strong Relationship.
    But Agregation is simple. a collection of objects( ex. List of Reportees) and they get associated to an Object (Manager).Relationship is not so tight here.but both are Has-A relationships

  7. In your 1st sentence i think you did mistake about parent child relationship.
    U said that employee class is the parent of manager class
    I think manager class is the parent of employee class.
    Because. Parent table has primary key and the child table has foreign key. Its mean 1 ManagerId can be added in employee table multiple times. Thats simple and clean.
    But from your sight
    If employee class is parent. Its mean 1 EmployeeId can be added in manager table multiple times. Look. How can 1 employee be of many managers or managers have a employee? ? I think you did mistake.


Please enter your comment!
Please enter your name here