Much has been learned over the years about what constitutes good object-oriented design, some of which has been gained at the expense of object-oriented pioneers, who, through trial and error, have discovered cases of poor design and have shared their knowledge with those of us who otherwise would find out the hard way why some designs are not viable.
The Gang of Four offer these nuggets of wisdom:
Program to an interface, not an implementation.1
Favor composition over class inheritance.2
Encapsulate the concept that varies.3
The first of these statements ...