Institute
which has a number of departments like CS and EE.
Every department has a number of students.
So, we make an Institute
class which has a reference to object or a number of objects (i.e., list of objects) of the Department
class.
That means Institute
class is associated with Department
class through its object(s).
And Department class has also a reference to object or objects (i.e., list of objects) of Student class.
It means it is associated with Student class through its object(s).
It represents a Has-A relationship.
|
Variety is the spice of life. |