October 2003
Intermediate to advanced
592 pages
13h 42m
English
Inheritance allows you to derive a new class from an existing class. Suppose that class C inherits from class B. Then class B is typically called the base class, and class C is called the derived class. Note that this terminology is not necessarily standard; some refer to B and C as superclass and subclass, or as parent and child classes, respectively. This book will stick with the terms “base” and “derived.”
A derived class definition automatically inherits the implementation and the programming contract of its base class. The idea is that the derived class starts with a reusable class definition and modifies it by adding more members or by changing the behavior of existing methods and properties.
One of the primary reasons ...