Class inheritance defines a subclass by extending another class's behavior, often with method overriding and subtyping. An editor might have an abstract
Command type with execute, and subclasses for insertion and deletion. The controller keeps commands through the common type and dynamic dispatch chooses each command's actual operation. Alternatively, a specialized document can extend a base document's documented behavior. An inheritance relationship used for substitution must preserve the superclass contract; borrowing its code alone does not justify exposing incompatible behavior. Commands exemplify the Command pattern without exposing document storage to the controller. Articles by others on the same topic
There are currently no matching articles.