I have just joined your website. I am attending B.Tech in Computer science and have completed upto inheritance in c++.
My first question here is: What is the relationship between inheritance and composition and why the two can be used in place of other.
dolphin.rise
0
Newbie Poster
Recommended Answers
Jump to PostThis article was written for Java but applies to C++ too.
Jump to Post>What is the relationship between inheritance and composition
Inheritance is a special case of composition.>why the two can be used in place of other
They solve the same problem and they're equally functional. If you're willing to suffer notational and structural inconveniences, inheritance can always be used in …
All 6 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Narue
5,707
Bad Cop
Team Colleague
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Narue
5,707
Bad Cop
Team Colleague
dolphin.rise
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.