C++ Programming - Objects and Classes - Discussion
Discussion Forum : Objects and Classes - General Questions (Q.No. 22)
22.
Which of the following means "The use of an object of one class in definition of another class"?
Discussion:
5 comments Page 1 of 1.
Raizada said:
4 years ago
When its about, classes, its inheritance, when about object, its composition.
(1)
Wildroar said:
4 years ago
Why it is not an inheritance? Explain, please.
Rishi said:
8 years ago
It is a process of making one class a data member of another class. You can achieve composition. If you have a class named car and a data member of the car could consist the object of the class named engine.
Raghu said:
1 decade ago
Can any one tell, What are the conditions should satisfied to achieve composition?
RajiSaj said:
1 decade ago
Composition in OOP models the real world situation in which objects are composed of other objects.
(1)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers