★Object Oriented Design Tips

Object Oriented Design Tips

(http://www.eventhelix.com/RealtimeMantra/Object%5FOriented/object_design_tips.htm)

 

  1. Stay close to problem domain
  2. Object discovery vs. object invention
  3. Pick nouns or noun phrases as classes
  4. Method names should contain a verb
  5. Prefix adjectives when naming inheriting classes
  6. Do not add suffixes to class names
  7. Avoid one-to-one mapping from structured design
  8. Replace multiple get-set methods with operations
  9. Model classes that handle messages as state machines
  10. Use const whenever possible
  11. Restrict header file level dependency
  12. Don't reinvent the wheel; use STL

 

你可能感兴趣的:(object,header,File,Class,domain,methods)