Design Using C++
- slide 2 : 4
Design and Programming
Chapter 24 of
The C++ Programming Language
Issues in this chapter
Failing to take advantage of the programming language - five ways page 725
Class hierarchies, page 735
Containment relationships: Member of type
X
, type
*X
, or
&X
? Page 738-739.
Containment versus inheritance
It is not possible to derive from an unknown class
But a member of class can be polymorphic
Assertions, invariants, preconditions, postconditions
Fat interfaces
The union of interfaces to a broad set of related classes
A container, for instance
Fat interfaces are best avoided