|
| ||||||||||
| Tags: advantages of inheritance, inheritance, merits of inheritance, oop, oop inheritance |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| What are the advantages of Inheritance?
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
| ||||
| ||||
| 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
| ||||
| ||||
| 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
| ||||
| ||||
| Re: What are the advantages of Inheritance?
Hi, Following are some situation where you need to use the concept of "Inheritance":
|
|
#5
| ||||
| ||||
| 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
| ||||
| ||||
| 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". |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "What are the advantages of Inheritance?" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is the difference between Single inheritance and multilevel inheritance? | Venugopala | Software Development | 3 | 08-01-2011 05:32 AM |
| Prevent inheritance in C # | kALAMATHI | Software Development | 5 | 04-01-2011 06:11 PM |
| What is an Inheritance in C#? | - Empty Shell - | Software Development | 4 | 09-02-2010 06:03 AM |
| Polymorphism VS Inheritance | Taylor D | Software Development | 5 | 22-01-2010 09:12 AM |
| Genericity and Inheritance | Ricky58 | Software Development | 4 | 30-10-2009 11:41 PM |