Thursday, July 9, 2009

What is difference b/w Inheritance & aggregation? And Also b/w Aggregation and Composition in C++?

With examples plz?

What is difference b/w Inheritance %26amp; aggregation? And Also b/w Aggregation and Composition in C++?
Inheritance means you are making the child, aggregation is you are inlcuding it inside.


consider


class A


{


}





class B :: class A


{


}





This is inheritance. class N has inherited properties from class A.





while,





class B


{


class A classa;


}





This is aggregation as class A is now included in class B.
Reply:http://www.libertyassociates.com/pages/c...
Reply:swathi


iam santhosh


from


India


u will find answer from above question


www.programmingincpp.com


Bye

survey for money

No comments:

Post a Comment