File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Equipment question

 
Tony Tranquil
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a confused point with the Equipment. I am going put Segment/Flight/Equipment into one class - Flight. My understanding with Flight is, a itinerary contains 1..* Flights, and each Flight should have a start location, end location, flight#, airplance model(like AirBus 310), blah, blah. Each flight contains 1..* seat depends on different airplance model.

So, why we need an independent Equipment class?

Thanks

T.T
 
Theodore Casser
Ranch Hand
Posts: 1902
Hibernate Netbeans IDE PHP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I might offer a suggestion here, and hopefully not step too far over into the bounds of 'helping' you do the assignment or giving away how I did it... consider how an airline would handle routes between cities on a timeschedule, as things change from day to day. Basically, what I'd consider is the airline's ability to be flexible.

Remember, there are no 'right' or 'wrong' answers if you can defend and explain why you made one choice over another.
 
sankha subhra das
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tony,
whether to model them as data members of flight class or as independent classes is ur call...

As Theodore said, "Remember, there are no 'right' or 'wrong' answers if you can defend and explain why you made one choice over another."

Thanks
Sankha Das
 
ravindra janapreddy
Ranch Hand
Posts: 84
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tony

An indivdual Equipment class indicated what kind of equipment is it? Is it an Airbus, Boeing, Twin-Engine aircraft, Helicopter etc.

Thanks

-- Ravi
 
Steven Wong
Ranch Hand
Posts: 295
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tony,

My understanding is that Segment (1..*) should be tied to the Itinerary and not Flight. Each segment could represent multiple flights that are required to reach destination B from destination A. For eg,

Flight Destination from A to B requires:

Segment 1: Flight 1 representing Destination A to A1
Segment 2: Flight 2 representing Destination A1 to A2
Segment 3: Flight 3 representing Destination A2 to A3
Segment 4: Flight 4 representing Destination A3 to B


Each of the segments could represent different equipments (B747, Airbus).
In my implementation, I may create one Segment class holding both the Equipment and Flight.
 
stan lee
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Steve,

You made a good analysis. However I feel that Flight class should hold the Equipment and not Segment as each Flight can have a different Equipment.

Also Iam confused how to show relation between a Flight and Seat. Can we use a Association class?

Any thoughts?

Regards!
Stan-Lee
 
Steven Wong
Ranch Hand
Posts: 295
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Stan,

Yeah, each Flight could have different Equipment but only one. The way I see is that tying the Equipment to the Flight or Segment makes no difference since a single Segment may have only one Flight which in turn may also have only one Equipment (based on BDM).

This is just my view - I think it all still boils down to how you document best your assumptions, basically there'll be no right / wrong answers.

With regards to your second question, can't you show the association link between Flight & Seat? What do you mean by an Association Class?
 
peng chen
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also encounter the problem which lets me think about :

Flight Destination from A to B requires:

Segment 1 : Flight 1 representing Destination A to A1
Segment 2 : Flight 2 representing Destination A1 to A2
Segment 3 : Flight 3 representing Destination A2 to A3
Segment 4 : Flight 4 representing Destination A3 to B

I also agree this point . but there is a question about this .Is the responsibility of the System or user to separate the segment .For example ,the user wants to fly A to B, will system automatically to separtate the trip to some segments for user?
 
Laxmi Raghu
Ranch Hand
Posts: 218
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not very clear about the above question. But following may help to clear out some things.

1 customer has 0 or more itenararies.
1 itenerary has 1 or more segments
1 segment has 1 flight
1 flight has 1 equipment
1 equipment has 1 or more seats.

We can assume things like above which for me looks more logical.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic