<<< Specifying the interfaces | Index | Design patterns >>> |
Most common reorganizations of a class hierarchy are
factoring the common part of two classes into a new class, and
splitting a class into two new ones.
The result is three classes: a base class and two derived classes.
When should such reorganizations be done? Indicators that such a reorganization is due might be:
If commonality between classes is observed, then factor out the common part. Also,
common patterns of use,
similarity of operations,
similarity of implementations.
<<< Specifying the interfaces | Index | Design patterns >>> |