[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
AsmOOP-Inherit
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
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
AsmOOP-Inherit
Inheritance
InheritanceInheritance 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
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
