29 Ağustos 2010 Pazar

Software Engineering with Inheritance

When a new class extends an existing class, the new class inherits the non-private members of the existing class. We can customize the new class to meet our needs by including additional members and by overriding superclass members. Doing this does not require the subclass programmer to change  the superclass`s source code.
Although inheriting from a class does not require access to the class source code, developers often insist on seeing the source code to understand how the class is implemented. Object oriented programming facilitates software reuse, potentially shortening development time.

The availability of sunstantial and useful class libraries delivers the maximum benefits of sotware reuse through inheritance. Application designers build their applications with these libraries, and library designers are rewarded by having their libraries included with the applications. Declaring a subclass does not affect its superclass`s source code.  Inheritance preserves of the superclass.

Hiç yorum yok:

Yorum Gönder