Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Cade Class Diagram why lineitem and product is 1 to 1

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I was going through the class diagram in the cade's book, Cade has shown a relationship of 1 to 1 between LineItem and Product. I think the relation should have been many to 1 from LineItem to Product. The reasoning i can say is that same Product can be found in lineitems which are for different Order.
Whats the reasoning here for 1 to 1 ?

Thanks
Ajay
 
Greenhorn
Posts: 18
 
Ajay Prakash Shukla
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I looked at the thread you mentioned, that means we need to draw the class diagram in particular context of customer and itinerary and that would end up having 1 to 1 relationship between flight and segment. But this thing just doesnt make sense, like do we have to mention in the document that the class diagram has been drawn within the context of a customer and itinerary.

Thanks
Ajay
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The analyst has translated the constraint: "an Itinerary can't contain more than one reservation by flight"

Regards

Jose
 
Hey! You're stepping on my hand! Help me tiny ad!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic