The above given code depict's the IS-A relationship or not.Answer in yes or no.
Ajith Kallambella
Sheriff
Joined: Mar 17, 2000
Posts: 5782
posted
0
YES!
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
rajashree ghatak
Ranch Hand
Joined: Mar 10, 2001
Posts: 151
posted
0
could anyone explain why the answer is "yes" a little elaborately? can't get how there can be is -a relationship between a class and interface. rajashree.
ratul banji
Ranch Hand
Joined: Mar 15, 2001
Posts: 108
posted
0
But ...Ajith If answer is YES...then wht. is 'is-like-a' relationship !!! Just asking. Ratul
Ajith Kallambella
Sheriff
Joined: Mar 17, 2000
Posts: 5782
posted
0
Fruit is-a Edible entity.
Seed is not an Edible entity.
Fruit has-a Seed.
Apple is-a Fruit, is-a Edible entity and has-a Seed.
BeerCan is not a Fruit.
BeerCan is not an Edible entity.
There isn't really a is-like-a relationship, not a standard one atleast. The is-a relation sometimes can be interchanged with is-like-a for example - Apple is like a fruit. As a purist I don't agree with this description completely because is-like-a sounds like Apple is an incomplete Fruit, though it has many properties of the Fruit. Cheers!