Replace Inheritance with Delegation

A subclass uses only part of a superclasses interface or does not want to inherit data.

Create a field for the superclass, adjust methods to delegate to the superclass, and remove the subclassing.

image/svg+xml Vector isEmpty Stack Stack isEmpty Vector isEmpty 1 return _vector.isEmpty();

inverse of Replace Delegation with Inheritance