 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
You
should not use a class to describe a single object
|
|
|
| • |
Every
noun should not be a class
|
|
|
| • |
Classes
should collect objects with similar behavior
|
|
|
| • |
Classes
should be large enough to describe a significant set of
|
|
|
objects,
but, they should not be too large either
|
|
|
|
• |
You
may find it tempting to design classes that are very general, but that
|
|
|
usually
is not helpful
|
|
|
| • |
Avoid
public data and cluttered interfaces
|
|
|
| • |
Operations
in a class should be consistent with each other in
|
|
|
regard
to their: names, arguments, return values, and behavior
|
|
|
| • |
Good
use of inheritance requires finding a “common” set of data
|
|
and/or
functionality to all classes
|
|