This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes doubt in IS-A relationship Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "doubt in IS-A relationship" Watch "doubt in IS-A relationship" New topic
Author

doubt in IS-A relationship

Parameswaran Thangavel
Ranch Hand

Joined: Mar 01, 2005
Posts: 485
hi
i doubt how this statisfies the IS-A relation

public class Species { }
public class Animal {private Species species;}

the class Animal has a reference to the class species....

literally is-a means extends....

can any one clear me?
Thanks in advance.
Animesh Shrivastava
Ranch Hand

Joined: Jul 19, 2004
Posts: 298
Yeah u right,
The question doesnt satisfy IS-A relationship.
IS-A means having extends relationship with the class
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Car is-a Vehical

class Vehical {

}

class Car extends Vehical {

}
Manash Das
Greenhorn

Joined: May 19, 2003
Posts: 14
Originally posted by Parameswaran Thangavel:
hi
i doubt how this statisfies the IS-A relation

public class Species { }
public class Animal {private Species species;}

the class Animal has a reference to the class species....

literally is-a means extends....

can any one clear me?
Thanks in advance.



whenever you are extending any class then it is always a is-a relationship and whenever you were actually using a particular class in other class or you has the class(Species) in the class(Animal) the you are in has a relationship.


Regards,<br />Manash Das
 
GeeCON Prague 2014
 
subject: doubt in IS-A relationship