The no-duplication principle: Member variables and function definitions should be distributed among class definitions to ensure that there is no duplication of identical code. Otherwise, duplicate copies are bound to become gratuitously different.
In the version of the program in
Segment 239, for example, the
length member variables and
volume member function reside in
box class, rather than in the
box_car, making those
member variables and member functions more generally available.