It's not a secret anymore!
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Itinerary contents Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Itinerary contents" Watch "Itinerary contents" New topic

Itinerary contents

Manny Pacman Pacquiao
Ranch Hand

Joined: Oct 04, 2006
Posts: 36
Which one is true?

1. An Itinerary contains at most 1 departure flight and the return flight(if two way)


2. An Itinerary contains many departure flights and the return flights(if two way), in this case the Itinerary is like a shopping cart. In my design I didn't use this idea... things are getting difficult because of this. Need help please. I really need to see the initial Domain Model again...
Beppe Catanese

Joined: Nov 07, 2006
Posts: 28
Hi Manny

my interpretation of the BD is the following:

Itinerary would AMS-NY return


Each segment is covered by one flight:
AMS-Rome KL101
Rome-NY BA7
NY-Rome BA8
Rome-Ams KL103

So I model:
relationship itinerary-segment as 1:n
relationship segment-flight as 1:1

I've seen a discussion ( about changing the cardinality of the relationship segment-flight.... but to be honest I like the approach I take, seems straight forward to me.

Hope this helps.

I agree. Here's the link:
subject: Itinerary contents
It's not a secret anymore!