The single most important strategy for reusable code design is abstraction.

When you design code, you should clearly separate the interface from the implementation. This separation makes the code easier to use, primarily because clients do not need to understand the internal implementation details in order to use the functionality.

Abstraction separates code into interfaces and implementation, so designing reusable code focuses on these two main areas. First, you must structure the code appropriately. What class hierarchies will you use? Should you use templates? How should you divide the code into subsystems?
Second, you must design the interfaces, which are the "entries" into your library, or code that programmers use, to access the functionality you provide.
