C++ Programming - OOPS Concepts - Discussion
Discussion Forum : OOPS Concepts - General Questions (Q.No. 13)
13.
Which of the following concepts provides facility of using object of one class inside another class?
Discussion:
48 comments Page 5 of 5.
Dev said:
1 decade ago
But in inheritance also we use the object of one class inside another class. Its so confusing.
Arjun said:
1 decade ago
Composition is has a type relationship car has wheels.
class wheel
{
int id;
};
class car
{
wheel w[4];
};
class wheel
{
int id;
};
class car
{
wheel w[4];
};
Shoeb qureshi said:
1 decade ago
Whats the main difference between composition and inheritance?
Vinesh said:
1 decade ago
Inheritance is having properties (member variables and member functions) of a class into another class and Composition is having object of some class into another class.
Ronzzz said:
1 decade ago
Still not clear. When class is made up of objects, member functions are not objects then ?
Siva said:
1 decade ago
Still now I can't understand the concept of inheritance? please give me the example for inheritance.
Suvaran said:
1 decade ago
What is mean by composition please give answer & one example?
Divya said:
1 decade ago
What do you mean by composition in c++?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers