Bequest

 31 December 18:00   

    

In absolute activity bequest is what we access from our parents. For archetype our

    

lifestyle, way of talking etc...

    

In Item Aggressive Programming Bequest is the action by which altar

    

of one chic access the backdrop and functionality of altar of addition

    

class. It supports the abstraction of hierarchical classification. For example,

    

the bird robin is a allotment of the chic aerial bird which is afresh a allotment of the

    

chic bird.

    

The assumption abaft this array of analysis is that anniversary acquired chic shares

    

accepted characteristics with the chic from which it is derived. In Item Aggressive

    

Programming (OOP), the abstraction of bequest provides the abstraction of reusability.

    

This agency that we can add added appearance to an absolute chic after

    

modifying it. This is accessible by anticipation a new chic from the absolute one.

    

The new chic will accept the accumulated appearance of both the classes. The absolute

    

address and ability of the bequest apparatus is that it allows the programmer

    

to reclaim chic that is almost, but not exactly, what he wants, and to clothier

    

the chic in such a way that it does not acquaint any abominable ancillary furnishings

    

into the blow of the classes. It is acclaimed that anniversary sub-class defines alone those

    

appearance that are different to it. After the use of classification, anniversary chic

    

would accept to absolutely cover all of its features.

    

For archetype

    

class Bird

    

{

    

char fly[30];

    

};

    

class Parrot: Bird

    

{

    

int eatMango;

    

};

    



    

Now the parrot inherits the functionality of bird to fly in the air. So what

    

anytime the fly amount is, the parrot will accept the aforementioned fly functionality.

    

Discuss this tutorial here



    



    

Forum: Inheritance (Total 0 Messages)

 


Tags: example, programming, features, functionality, object

 class, inheritance, features, parrot, functionality, example, , object oriented programming,

Share Bequest: Digg it!   Google Bookmarks   Del.icio.us   Yahoo! MyWeb   Furl  Binklist   Reddit!   Stumble Upon   Technorati   Windows Live   Bookmark

Text link code :
Hyper link code:

Also see ...

Permalink
Article In : Computers & Technology  -  Object Oriented Programming