hi all, I want to know how to determine whether a given relationship falls under "is a " or "has a " relationship. I know when we use extends to extend from a class then it falls under "is a " relationship. i am confused with interface relations especially. Sorry if it is too basic/beginner question. Can someone explain pls? Thanks in advance. Sunitha. S
Paul Anilprem
Enthuware Software Support
Ranch Hand
Joined: Sep 23, 2000
Posts: 2547
posted
0
There are 3 of them: is-a : When you extend. Ex: if class A extends B, then A is-a B. has-a: When you contain something. Ex: If class A has a 'field' of class B, then A has-a B. is-like-a : When you implement. Ex: if class A implements I, then A is-like-a I. HTH, Paul.
------------------ Get Certified, Guaranteed! (Now Revised for the new Pattern) www.enthuware.com/jqplus