• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Equipment question

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1902
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic