Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is there a composite relationship between Itinerary and Segment?

 
Joe Nguyen
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just begin to do part II and would like to get people's opinions about the relationship between Itinerary and Segment.

Since Itinerary has 1...Segments and a Segment can be an Itinerary (in this case Itinerary has exactly 1 Segment), Itinerary can be viewd as a composite and Segment as a leaf. When a customer would like to change the existing Itinerary, Customer selects the segment to change. In order to change, the segment is deleted and the Prepare Itinerary Use Case is executed. Using composite relationship, the pricing would be easy to calculate.
 
Joe Nguyen
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean Itinerary has 1...many Segments. To calculate the price, the getPrice() method will be invoked on the component.
 
Chandramouli Ram
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joe,

In my opinion, the analogy to a general eCommerce site is: Itinerary is Order while segment is a line item. So, if you say Itinerary is a composite, I believe you are right.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic