Eliminating spurious classes
- vague -- system, security-provision, record-keeping
- attribute -- account-data, receipt, cash
- redundant -- user
- irrelevant -- cost
- implementation -- transaction-log, access, communication
Good classes
slide: Eliminating spurious classes
For example, the notion underlying the candidate class
may be too vague to be represented by a class,
such as the notion of system or record-keeping.
Another reason for rejecting a suggested class
may be that the notion represents not so much a class,
but rather a possible attribute of a class.
Further, a proposed class may either be redundant,
for example the class user, or simply
irrelevant, as is the class cost.
And finally,
a class may be too implementation oriented,
such as the class transaction-log
or classes that represent the actual communication
or access to the account.
Looking back, our choice of candidate classes seems
to have been quite fortunate,
but generally this will not be the case,
and we may use the checklist above to prune
the list of candidate classes.
An interesting architectural issue is, how may we
provide for future extensions of the system?
How easily can we reuse the design and the code for
a system supporting different kinds of accounts,
or different input or output devices?
And how can we establish that the objects, as
identified, interact as desired?