Aprenda a implementar subclases, llamar a métodos de superclases desde subclases y controlar qué clases pueden derivar de una superclase.
|Names of superclasses|
|Superclass for heterogeneous array formation|
Specify superclasses on the classdef line after the class name.
Specify superclasses on the
classdef line in the class file.
Subclass methods can override inherited superclass methods. Subclass methods can call the superclass method that they override.
Control the order in which MATLAB® constructs objects in class hierarchy.
Subclasses can modify inherited methods.
Subclasses can modify inherited properties that are abstract or private.
Multiple inheritance can lead to conflicting definitions. All superclasses must be free of conflicts in definition.
Classes can restrict the classes that can derive from it.
Enable both handle and value classes to derive from a specific class.
Handle compatible classes have applications for mixin and abstract superclasses.
Handle compatible class methods must work with both handle and value objects.
Heterogeneous class hierarchies impose certain restrictions when classes are handle compatible.
Determine what level of access is allowed for properties, methods, and events.