Code Complete
Code Complete
Benefits of ADTs
You can hide implementation details
Changes dont effect whole program
You can make the interface more informative
Its easier to improve performance
The program is more obviously correct
The program becomes more self documenting
You dont have to pass data all over your program
You are able to work with real world entities rather than low
level structures
Good abstraction good class interfaces
Present consistent level of abstraction in class interface
Be sure you understand what abstraction the class is
implementing
Provide services in pairs with their opposites
Move unrelated information to another class
Make interfaces programmatic rather than semantic when
possible
Beware of erosion of the interfaces abstraction under
modification
Dont add public members that are inconsistent with interface
abstraction
Consider abstraction and cohesion together.
Good encapsulation
Minimize accessibility of classes and members
Dont expose member data in public