Chapter 6. Inheritance


The last chapter discussed association relationships, how one class can reference another class or set of classes using fields or properties. This chapter looks at another relationship between classes, that of inheritance and building a class hierarchy.

Beginner Topic: Inheritance Definitions

The previous chapter provided an overview of inheritance. Here's a review of the defined terms.

  • Derive/inherit: Specialize a base class to include additional members or customization of the base class members.

  • Derived/sub/child type:The specialized type that inherits the members of the more general type.

  • Base/super/parent type: The general type whose members a derived type inherits.

  • Inheritance forms: An "is a" relationship. The derived type is always implicitly also of the base type. Just as a hard drive is a storage device, any other type derived from the storage device type is a type of storage device.





Essential C# 2.0
Essential C# 2.0
ISBN: 0321150775
EAN: 2147483647
Year: 2007
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net