aspose file tools*
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
Author

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)

or

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
Greenhorn

Joined: Nov 07, 2006
Posts: 27
Hi Manny

my interpretation of the BD is the following:

Itinerary would AMS-NY return

Segments:
AMS-Rome
Rome-NY
NY-Rome
Rome-Ams

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 (http://www.coderanch.com/t/153536/java-Architect-SCEA/certification/Passed-Part) 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.

Beps
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Itinerary contents