Results 1 to 6 of 6

Thread: What are the advantages of Inheritance?

  1. #1
    Join Date
    Dec 2009
    Posts
    68

    What are the advantages of Inheritance?

    Hello Guys,

    I am studying the Object Oriented Programming. I want to be aware about the advantages of the inheritance. I know inheritance is the important concept of the object oriented programming. I have searched information regarding advantages of inheritance over various web sites but didn't get proper details. If you have sound knowledge about the inheritance then please let me know it's advantages.

  2. #2
    Join Date
    Apr 2008
    Posts
    2,005

    Re: What are the advantages of Inheritance?

    In OOP the "inheritance" is used for to implement the re-usability. Inheritance is nothing but a principle specific to OOP, to create a new class from an existing class. It can be represented as a hierarchy of classes, sometimes called tree classes. Some OOP languages allow multiple inheritance, which means they offer the opportunity to inherit a class of two super classes. Thus, this technique allows to group within a single class attributes and methods of several classes.

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    Re: What are the advantages of Inheritance?

    The concept of inheritance opens the door to a new kind of programming. Through the concept of inheritance, the object Building will be able to make to one or of descendants. These descendants will all benefit from the characteristics of their ancestor, Namely its fields and methods. However, the descendants retain opportunity to own their own fields and methods. As a child inherits characteristics of parents and develops his own, an object can inherit characteristics of its ancestor.

  4. #4
    Join Date
    Oct 2005
    Posts
    2,393

    Re: What are the advantages of Inheritance?

    Hi,

    Following are some situation where you need to use the concept of "Inheritance":
    • If you want to reuse the code base classes.
    • If you want to create global changes to derived classes by changing a base class.
    • You must apply the same class and the same methods to different data types.

  5. #5
    Join Date
    May 2008
    Posts
    2,389

    Re: What are the advantages of Inheritance?

    This process of inheritance can be repeated. In other words, it is quite possible to declare this a descendant of House, Developing specialization: a Chalet or a Villa. But equally, there is no theoretical restrictions on the number of offspring for an object. So, why not not declare objects Building or Plant whose common ancestor is always Building. The objects of an inheritance hierarchy comprises their base class because they inherit the properties, fields methods defined in the base class.

  6. #6
    Join Date
    Feb 2008
    Posts
    1,852

    Re: What are the advantages of Inheritance?

    The "Inheritance" is used to make the " hierarchy of classes". it is also referred as "Class Tree". The tree of class basically start the a general class called super class or parent class, ancestor class or super class. The genealogical metaphors are many). Then the derived classes (subclass or subclass) have become increasingly specialized. Thus, we can generally express the relation which binds a subclass to its mother by the sentence "is a".

Similar Threads

  1. Replies: 3
    Last Post: 08-01-2011, 06:32 AM
  2. Prevent inheritance in C #
    By kALAMATHI in forum Software Development
    Replies: 5
    Last Post: 04-01-2011, 07:11 PM
  3. What is an Inheritance in C#?
    By - Empty Shell - in forum Software Development
    Replies: 4
    Last Post: 09-02-2010, 07:03 AM
  4. Polymorphism VS Inheritance
    By Taylor D in forum Software Development
    Replies: 5
    Last Post: 22-01-2010, 10:12 AM
  5. Genericity and Inheritance
    By Ricky58 in forum Software Development
    Replies: 4
    Last Post: 30-10-2009, 11:41 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,617,873.14227 seconds with 17 queries