Friday 17 April 2015

Advantages of Inheritance


? When inherited from anoterh class, the code that provides a behavior required in the derived class need not    have to be rewritten. Benefits of reusable code include increased reliability and a decresed maintenance cost because of sharing of the code by all its users.

? Code sharing can occur at several levels. For example, at a higher level, many users or projects can use the same class. These are referred to as software components. At the lower level, code can be shared by two or more classes within a project.

? When multiple classes inherit from the same superclass, it guarantees that the behavior they inherit will be the same in all cases.

? Inheritance permits the construction of reusable software components. Already several such libraries are commercially available and many more are expected to able available in the near future.

? When a software system can be constructed largely out of reusable components, development time can be concentrated on understanding the portion of a new system. Thus, software systems can be generated more quickly and easily by rapid prototyping.

No comments:

Post a Comment