With reference to the UML diag available at
http://raverun.com/javaranch/moment-interval.jpg ;
I need help on mapping this to actual code.
From my understanding; the moment-interval
pattern models
an event happening at a particular instance. Thus
"Performance" is the hub of the design while the other
entities are its spokes. In order to model all the relations;
I have something like this:
The question:
I also have entities "Race" and "Event".
An "Event" will consists of 1 or more "Race"(s). And there
will be multiple categories in a "Race". Each category
will be associated with a collection of "MarathonPerformance"(s). If "Category" aggregates the "MarathonPerformance" collection; then I still have redundant "Category" members in each "MarathonPerformance" class. What am I doing wrong here ? Thanks
Pho