Inheritance

TURBU

Inheritance

 

Certain object classes have enough things in common that implementing the same properties and methods for each different one would be redundant.  Instead, it's possible to declare all of the common elements in a base class and define the other classes as descendant classes (also called subclasses or child classes) of the base class.  A descendant class inherits all of the elements of its parent class, plus any new properties or methods that are defined for it.  In essence, a descendant class is a more specialized type of its base class.  For example, the TRpgCharacter class contains a Flash method which can be used with any object that descends from TRpgCharacter.

This help file was created with the free trial version of HelpScribble.