[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
AsmOOP-Inherit

Inheritance

Inheritance

Inheritance is the mechanism which allows a class A to inherit properties of a class B. We say ``A inherits from B''. Objects of class A thus have access to attributes and methods of class B without the need to redefine them. The following definition defines two terms with which we are able to refer to participating classes when they use inheritance.

Superclass/Subclass

If class A inherits from class B, then B is called superclass of A. A is called subclass of B. Objects of a subclass can be used where objects of the corresponding superclass are expected. This is due to the fact that objects of the subclass share the same behaviour as objects of the superclass.

Extracted from "Introduction to Object-Oriented Programming Using C++" by Peter Müller (pmueller@uu-gna.mit.edu), Globewide Network Academy (GNA), www.gnacademy.org/, August 31, 1997

last edited (January 15, 2005) by PrzemekG_, Number of views: 2645, Current Rev: 2 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.