Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

relationship

 
mohanasundaram muthukannan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

difference between the "is-a" and the "has-a" relationship ?

Thanks in advance
Mohan
 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Non-computer-related language:

John has a cat.

Garfield is a cat.

Computer-related:

class John {
Cat pet;
}

class Garfield extends Cat{
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic