Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Types of Inheritance

This is a discussion on Types of Inheritance within the OOPS forums, part of the Software Development category; I know basic concepts of Inheritance. But I want to know is there any types of inheritance? If so how many types are available and what are they. Can someone ...

Go Back   Geeks Talk > Software Development > OOPS
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

OOPS Object-Oriented Programming Concepts

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-04-2006
Contributing Member
 
Join Date: Jul 2006
Posts: 77
Thanks: 0
Thanked 5 Times in 3 Posts
scott is on a distinguished road
Exclamation Types of Inheritance

I know basic concepts of Inheritance. But I want to know is there any types of inheritance? If so how many types are available and what are they. Can someone brief me on this.
Reply With Quote
The Following 3 Users Say Thank You to scott For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 09-16-2006
Expert Member
 
Join Date: Jul 2006
Posts: 101
Thanks: 0
Thanked 6 Times in 4 Posts
sripri is on a distinguished road
Re: Types of Inheritance

There are two types of Inheritance. They are namely:
Single Inheritance
Multiple Inheritance
Single Inheritance:
This is one in which derived class has only one direct base class.
Multiple Inheritance:
This is one in which derived class has more than one direct base class.
Reply With Quote
  #3 (permalink)  
Old 01-05-2007
Expert Member
 
Join Date: Oct 2005
Location: india,cochi,bangalore
Posts: 395
Thanks: 2
Thanked 9 Times in 8 Posts
vmshenoy is on a distinguished road
Re: Types of Inheritance

hi

types of inheritance


single level inheritance eg ( class B extends Class A)

Multilevel inheritance eg( class C extends class B and class B extends class A)
multiple inheritance Class C inherits Class A features as well as Class B featues.This type of inheritance is not allowed in JAVA.

hop this helps u to some extent

bye
__________________
:)
NEVER SAY DIE.
Reply With Quote
  #4 (permalink)  
Old 01-05-2007
Contributing Member
 
Join Date: Dec 2006
Location: Chennai-India
Posts: 77
Thanks: 0
Thanked 2 Times in 2 Posts
raju1984 is on a distinguished road
Re: Types of Inheritance

there are many tpes of inheritence:

single inheritence-one super and one sub class
multiple-many super and one sub class
multi level-the sub class of one level forms the super class of another level
hierarchical- one super and many sub classes
hybrid-multiple and multi level combined.
__________________
[B][B][I][COLOR="Blue"][FONT="Times New Roman"]Regards,
Raju[/FONT][/COLOR][/I][/B][/B]
Reply With Quote
The Following User Says Thank You to raju1984 For This Useful Post:
  #5 (permalink)  
Old 01-22-2007
Contributing Member
 
Join Date: Jul 2006
Posts: 77
Thanks: 0
Thanked 5 Times in 3 Posts
scott is on a distinguished road
Re: Types of Inheritance

Thank you friends for your answers.I could get a detailed idea on types of inheritance available.
Reply With Quote
  #6 (permalink)  
Old 08-16-2007
Junior Member
 
Join Date: Aug 2007
Location: varanasi,U.P.,India
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
A. Gupta is on a distinguished road
Re: Types of Inheritance

Quote:
Originally Posted by scott View Post
I know basic concepts of Inheritance. But I want to know is there any types of inheritance? If so how many types are available and what are they. Can someone brief me on this.
there 5 types of inheritence
1.singleton inheritence
2.multilevel inheritence
3.hirarchical inheritence
4.hybrid inheritence
5.multiple inheritence
Reply With Quote
  #7 (permalink)  
Old 06-02-2008
Junior Member
 
Join Date: Jun 2008
Location: Republic of Moldova
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
sympro is on a distinguished road
Re: Types of Inheritance

In C++ inheritance can be private or public.
Private inheritance [class A {...}; class B : private A {...};] means that sub-class will inherit only public methods of base class.
Public inheritance [class A {...}; class B : public A {...};] means that sub-class's methods can access protected fields of base class.
Reply With Quote
  #8 (permalink)  
Old 06-24-2008
Expert Member
 
Join Date: Dec 2007
Location: Pune
Posts: 139
Thanks: 0
Thanked 7 Times in 7 Posts
peeyush_jain is on a distinguished road
Re: Types of Inheritance

There are two types of inheritance used in modern programming languages. C# and other .NET languages use single inheritance. This means that a subclass may only inherit functionality from a single base class.

Multiple inheritance permits a subclass to have two or more superclasses. In this situation the derived class inherits functionality from several base classes. Multiple inheritance is not supported by C# or the .NET framework. However, this does not stop a class from providing many public interfaces as will be seen in a later article.

PLease let me know if i am wrong or missing something
Reply With Quote
The Following User Says Thank You to peeyush_jain For This Useful Post:
  #9 (permalink)  
Old 06-26-2008
Junior Member
 
Join Date: Apr 2008
Location: hyderabad
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
sadashivuduj is on a distinguished road
Smile Re: Types of Inheritance

Quote:
Originally Posted by scott View Post
I know basic concepts of Inheritance. But I want to know is there any types of inheritance? If so how many types are available and what are they. Can someone brief me on this.
Basically there are two types of inheritances are there.
they are:
single and multiple..
But, actually we had 5 types of inheritances are there.
they are:
single inheritance.
multiple inheritance.
multi-level inheritance.
hybrid inheritance and
multi path inheritance.
Reply With Quote
  #10 (permalink)  
Old 08-30-2008
Junior Member
 
Join Date: Jun 2008
Location: vijayawada
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
suhana is on a distinguished road
Exclamation Re: Types of Inheritance

inheritance is of 5 types
1.single inheritance:
only one baseclass,and one derived class access memberfunctions,datamembers from it. and derived class can't behave again base class.
2.multilevel inheritance:
eg: base class
l
derived1 class
l
derived2 class
l
derived3 class
.
.
again derived class acts as another base class
3.multiple inheritance:
there are two base classes and one derived class which is derived from both two base classes.
base1 class base2class
derived class
4.hirarchical inheritance:
in this one common base class and derived class and from those another derived classes.
5.hybrid inheritance:
it is a combination of any above inheritance types.
that is either multiple-multilevel
multiple-hirarchical
any other combination
Reply With Quote
  #11 (permalink)  
Old 09-06-2008
Junior Member
 
Join Date: Jun 2008
Location: Hyderabad
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
srinivas.kouth is on a distinguished road
Re: Types of Inheritance

Quote:
Originally Posted by scott View Post
I know basic concepts of Inheritance. But I want to know is there any types of inheritance? If so how many types are available and what are they. Can someone brief me on this.
Inheritance are 3 types
1. Multilevel Inheritance
2. Multiple Inheritance
3. cyclic Inheritance

note : - cyclic Inheritance is never used and no programming language support it.
Reply With Quote
  #12 (permalink)  
Old 09-08-2008
Junior Member
 
Join Date: Sep 2008
Location: pune
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
amoljore is on a distinguished road
Re: Types of Inheritance

multilevel inheritance
Reply With Quote
  #13 (permalink)  
Old 09-24-2008
Junior Member
 
Join Date: Sep 2008
Location: india
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
pradeeban2getplaced is on a distinguished road
Re: Types of Inheritance

There are 6 types of inheritance viz,
1.Single level inheritance
2.Multiple level inheritance
3.Multilevel inheritance
4.Hybrid inheritance
5.Heirarchial inheritance
6.Multipath inheritance
Reply With Quote
  #14 (permalink)  
Old 10-04-2008
Junior Member
 
Join Date: Sep 2008
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
sanjayror is on a distinguished road
Thumbs up Re: Types of Inheritance

There are exect five types of Inhertience .

1). Single level Inhertience.
2). multilevel Inhertience.
3). hybrid Inhertience.
4).hierarchical Inhertience.
5).multipal Inhertience.

But multilevel or multipal can be consider the same.
Reply With Quote
  #15 (permalink)  
Old 10-16-2008
Contributing Member
 
Join Date: Oct 2008
Location: tamilnadu,india
Posts: 74
Thanks: 2
Thanked 6 Times in 6 Posts
rakesh trichy is on a distinguished road
Re: Types of Inheritance

Types of inheritance are 1.single inheritance 2.multiple inheritance 3.multipath inheritance 4.multi level inheritance 5.virtual path inheritance 6.hierarchical inheritance 7.hybrid inheritance
Reply With Quote
  #16 (permalink)  
Old 10-22-2008
Junior Member
 
Join Date: Oct 2008
Location: india
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
kumar aarjab is on a distinguished road
Re: Types of Inheritance

Quote:
Originally Posted by scott View Post
I know basic concepts of Inheritance. But I want to know is there any types of inheritance? If so how many types are available and what are they. Can someone brief me on this.
they are single,multiple,hybrid and multilevel types
we can easily get what they mean through it
Reply With Quote
  #17 (permalink)  
Old 02-11-2009
Junior Member
 
Join Date: Feb 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
gauravahuja12 is on a distinguished road
Re: Types of Inheritance

Quote:
Originally Posted by scott View Post
I know basic concepts of Inheritance. But I want to know is there any types of inheritance? If so how many types are available and what are they. Can someone brief me on this.
... plz roly as soon as possible
Reply With Quote
  #18 (permalink)  
Old 02-14-2009
Junior Member
 
Join Date: Feb 2009
Location: INDORE
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
prachi KHANDELWAL is on a distinguished road
Re: Types of Inheritance

Thier are 4 type of inheritence ----
1.single level
2.multilevel
3.multiple (in java knn as Interface)
4.Heirarchical
5.Hybrid
Reply With Quote
  #19 (permalink)  
Old 02-18-2009
Junior Member
 
Join Date: Sep 2008
Location: hydrabad
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
leelakumar is on a distinguished road
Re: Types of Inheritance

C++ has the following inheritanceses single inheritance multiple inheritance multilevel inheritance hybrid inheritacnce,heirarchical inheritace in java has the following inheritances single ,multilevel ,hybrid, java does not support multiple inheritance, but overcomming the above problem using interface
Reply With Quote
  #20 (permalink)  
Old 03-02-2009
Junior Member
 
Join Date: Mar 2009
Location: Washington, DC
Posts: 10
Thanks: 0
Thanked 3 Times in 1 Post
u6022 is on a distinguished road
Re: Types of Inheritance

Two types
(1) implementation
(2) interface

Differences in multiplicity and protection level have already been mentioned.
Reply With Quote
Reply

  Geeks Talk > Software Development > OOPS

« Oops | Interface »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Types of Processing Times blenda Windows 2 10-13-2008 10:26 AM
File Types in Linux Bessie Unix/Linux 2 04-25-2007 06:19 AM
Triggers Types scott SQL 1 07-30-2006 07:18 PM
Types of JDBC Deriver Managers timmy Java 1 07-17-2006 05:12 PM


All times are GMT -4. The time now is 06:50 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved