Which concept depicts the use of object of one class as a data member of another class c)compasition?
Answers
Answered by
0
The properties of one class can be used by declaring the object as class data member in another class. This is called as Delegation.
The class which has an object as a member of another class, it is called as a container class.
In Delegation, the composed class consists of objects from other classes and uses their properties through their objects. This kind of relation is usually termed as “has-a-relationship” or “has-a-containership”.
The class which has an object as a member of another class, it is called as a container class.
In Delegation, the composed class consists of objects from other classes and uses their properties through their objects. This kind of relation is usually termed as “has-a-relationship” or “has-a-containership”.
Similar questions
History,
8 months ago
Hindi,
8 months ago
English,
8 months ago
Math,
1 year ago
Social Sciences,
1 year ago