4 Replies - 7080 Views - Last Post: 05 August 2012 - 10:59 AM Rate Topic: -----

#1 Panch  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 1
  • Joined: 19-February 09

"has a" relationship and "Kind of " relationship i

Posted 19 February 2009 - 02:36 AM

Hi,
I would like to know what is "Kind of " relationship and "has a" relation ship between the C++ objects.

I assume the kind of relationship means the inheritane and has a relationship means creating object within another object. Please clarify..


Thanks,
Panch.
Is This A Good Question/Topic? 1

Replies To: "has a" relationship and "Kind of " relationship i

#2 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 988
  • View blog
  • Posts: 5,135
  • Joined: 28-September 06

Re: "has a" relationship and "Kind of " relationship i

Posted 19 February 2009 - 05:42 AM

Probably better to have asked this in the "Computer Science" forum because you are (or your teacher is) asking about OOP principles which are not C++ specific.

Have a read here:
http://en.wikipedia.org/wiki/Is-a
and here:
http://en.wikipedia.org/wiki/Has-a
Was This Post Helpful? 0
  • +
  • -

#3 bszmyd  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 15
  • View blog
  • Posts: 104
  • Joined: 09-February 09

Re: "has a" relationship and "Kind of " relationship i

Posted 19 February 2009 - 08:16 AM

View PostPanch, on 19 Feb, 2009 - 01:36 AM, said:

I assume the kind of relationship means the inheritane and has a relationship means creating object within another object. Please clarify..

Correct...or at least have a handle to another object. Could be a pointer in otherwords.
Was This Post Helpful? 0
  • +
  • -

#4 hariees  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 2
  • Joined: 05-April 10

Re: "has a" relationship and "Kind of " relationship i

Posted 05 August 2012 - 10:46 AM

Kind of relationship means ---"inheritance"(obj of one class gets properties from obj's present in other class )

has a relationship means ---"delegation"(obj of one class is used as data member of another class)

for more reference refer ashok kamthane's oop with ansi & turbo c++ ebook
Was This Post Helpful? -1
  • +
  • -

#5 jimblumberg  Icon User is offline

  • member icon

Reputation: 3041
  • View blog
  • Posts: 9,276
  • Joined: 25-December 09

Re: "has a" relationship and "Kind of " relationship i

Posted 05 August 2012 - 10:59 AM

Please don't resurrect old topics.

Jim
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1