Design and Documentation ◾ 139
expected use of subordinate data structures, legal values of data elds,
ownership responsibilities, relationships between elds (e.g., inven-
tory value drives commission percentage), and bookkeeping details.
Reasonable examples of implementation invariants include: interface of
subobject echoed for utility; linked list structure used to support frequent
modication of sorted data; internal (static) registry guarantees unique
ID. By identifying implementation structures and design constraints,
implementation invariants communicate design intent, and prioritization
of requirements.
Class integrity can be more easily maintained when implementation pri-
orities and details are clearly specied. What happens whe ...