Solved

difference between class inheritance and composition

Posted on 1998-11-19
2
1,135 Views
Last Modified: 2008-02-20
what is the different between class Inheritance and composistion ? and When would I choose the former over the later ?
0
Comment
Question by:anhben
2 Comments
 
LVL 5

Expert Comment

by:msmolyak
ID: 1227860
The following book has an entire chapter (very well written too) dedicated to this subject:

Java Design : Building Better Apps and Applets (Yourdon Press Computing Series), 1st Edition by Peter Coad, Mark Mayfield, Pete Coad

It gives you the rules on when to use inheritance and when to use composition instead.
0
 
LVL 5

Accepted Solution

by:
fontaine earned 50 total points
ID: 1227861
In the November issue of the Javaworld on-line magazine, there is a 2500 words article
entitled...

"Inheritance versus composition: Which one should you choose? "

This is exacly what you need! Here is the URL:

http://www.javaworld.com/javaworld/jw-11-1998/jw-11-techniques.html
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now