Java   View all facts   Glossary   Help
principle > is-a versus has-a principle
Next principlelook-it-up principle    Upprinciple    Previous principleexplicit-representation principle   

is-a versus has-a principle
subjectfact 
is-a versus has-a principleis a subtopic of Classes2001-10-19 11:37:02.0
is a subtopic of Inheritance2001-10-19 11:37:02.0
is a kind of principle2001-10-19 11:37:02.0
states that if you find yourself using the phrase "an X is a Y" when describing the relation between two classes, then the first class is a subclass of the second; if you find yourself using "X has a Y", then instance of the second class appear as parts of instances of the first classadded by: JK, source: On To Java, 2001-10-19 11:37:02.0