Date: 2006-12-01 07:46:22
> Maarten Kronenburg wrote:
> > The class represents the set, and an object of that class
> > an element from that set,
> Agreed, so far.
> > whether the set is employees and secretaries, or integers
> and unsigned
> > integers.
> The operations on secretaries are usually a superset of the
> operations on employees, while the operations on unsigned
> integers are a subset of the operations on signed integers.
> Inheritance is only applicable in the former case. The flaw
> in the latter scenario is similar to adding operations
> specific to secretaries, trainees or managers to the
> interface of 'employee'.
Things like secretary, manager, etc. might better be considered as
roles, an employee might have > 1 role.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk