>Please take my comments with the proverbial grain of salt. I
>have been using Object Oriented Modeling since the early 1990's
>and have found the approach described below to be intuitive but
>hard to work with.
I've been an Object Modeler since 1978, and a Data Modeler
since the mid 80's. Yes, you can be both without suffering
bipolar disease! :-)
>Specifically, Sex is an attribute of a person, not a sub type.
>Doctor, Lawyer, etc. are roles. This is best handled by
>containership.
>
The attribute is contained, but as a consequence of having the
attribute value (male/female] the resulting subclass has
different attributes and operations. This is exactly what the
UML2 Generalization Sets and Powertypes is trying to model (and
it's a great step forward). In the Data Modeling domain, we're
quite used to these concepts and it was disheartening to see UML
1 didn't support this. Now UML 2 DOES!
>The bottom line is to model something as it is. For example, I
>am a person. I happen to be a Spouse, an Employee, a parent, and
>many other things at points in time. So, I am a type of person
>but I inhabit these roles over time.
You are quite right, these latter concepts are roles and should
be modeled as such. In particular, since many of these roles
are dynamic, using static inheritance would be problematic.
>In my experience, this creates much more resilient systems.
This is undoubtedly true... A correct conceptual model
literally "designs out" whole classes of problems that many
systems suffer from.