Heuristics for Design

Overview

  1. Use real-world objects
  2. Form abstractions
  3. Encapsulate details
  4. Use inheritance to simplify the design
  5. Information hiding
  6. Identify where change is likely
  7. Use strong cohesion
  8. Build hierarchies
  9. Formalize class contracts
  10. Avoid failure
  11. Brute force when needed
  12. Draw diagrams

Use Real World Objects

Form Abstractions

Encapsulate Details

Use Inheritance To Simplify The Design

Inheritance

Aggregation

Information Hiding

Reasons:

  1. Hide complexity
  2. Limit the effect of changes to the class so they aren’t seen outside of the class (localize changes to the class)

Identify Where Change is Likely

  1. Identify items which are likely to change (list in requirements).
  2. Separate items likely to change (put in their own class or classes).
  3. Isolate them by designing interfaces to hide changes; limit scope of change to inside that class.

Business

Hardware

Language

###Difficult Areas

Status Variables

Size Constraints

Strong Cohesion

Build Hierarchies

Formalize Class Contracts

Design for Testing

Avoid Failure

Brute Force When Needed

Draw Diagrams