*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Equipment question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Equipment question" Watch "Equipment question" New topic
Author

Equipment question

Tony Tranquil
Greenhorn

Joined: Sep 23, 2003
Posts: 24
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

Joined: Mar 14, 2001
Posts: 1902

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.


Theodore Jonathan Casser
SCJP/SCSNI/SCBCD/SCWCD/SCDJWS/SCMAD/SCEA/MCTS/MCPD... and so many more letters than you can shake a stick at!
sankha subhra das
Greenhorn

Joined: Jun 24, 2003
Posts: 22
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

Joined: Jan 30, 2001
Posts: 84
Tony

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

Thanks

-- Ravi


SCEA, SCBCD, SCWCD, SCJD, SCJP
Steven Wong
Ranch Hand

Joined: Mar 07, 2002
Posts: 295
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.


best regards,<br />Steven<br />SCJP, SCEA
stan lee
Greenhorn

Joined: Apr 08, 2003
Posts: 21
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

Joined: Mar 07, 2002
Posts: 295
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

Joined: Jun 09, 2003
Posts: 35
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?


SCJP 1.4 SCJD SCWCD1.4 SCBCD1.3<br />SCEA OCP(8i%9i)
Laxmi Raghu
Ranch Hand

Joined: Feb 16, 2005
Posts: 218
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.
 
 
subject: Equipment question
 
Similar Threads
Some do's & don'ts
FBN Object Design
Passed Part 2/3
Passed Part 2/3 with 100
Route - Flight - Segment again.