Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 10: Object-Oriented Design Princ... > Class Design Guidelines for Fun and ...

Class Design Guidelines for Fun and Enjoyment

Finally, just so we shouldn’t exit the chapter without yet another list, we present a list of 24 class design guidelines. These guidelines are somewhat more specific than the general design guidelines that we have described above, but they are handy to have around. Cut them out and burn them into your brain.

These 24 class design guidelines are taken from Davis14 and McConnell.15

  1. Present a consistent level of abstraction in the class interface.
  2. Be sure you understand what abstraction the class is implementing.
  3. Move unrelated information to a different class (ISP).
  4. Beware of erosion of the class’s interface when you are making changes. (ISP).
  5. Don’t add public members that are inconsistent with the interface abstraction.

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial