• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

[Moment-interval pattern] Mapping to code

 
Ranch Hand
Posts: 782
Python Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 17734
302
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One thing you don't want to do when modeling is to include details that do not pertain to the problem. So, before trying to see what you are doing wrong (if anything), it might help if we understand what you are trying to do before suggesting alternatives.

------------------
Junilu Lacar
Sun Certified Programmer for the Java� 2 Platform
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic