Geeks Talk

Prepare for your Next Interview




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 FAQ Members List Calendar Mark Forums Read
  #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 8 Times in 7 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 6 Times in 6 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
  #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 5 Times in 5 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
Reply

  Geeks Talk > Software Development > OOPS


Thread Tools
Display Modes


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 07:56 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved