This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes what do segment  and leg mean? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "what do segment  and leg mean?" Watch "what do segment  and leg mean?" New topic
Author

what do segment and leg mean?

Emma Yu
Greenhorn

Joined: Jan 29, 2004
Posts: 17
I cannot find the clear definition in the dictionary. Please help me. one way trip is just one segment, round trip is two segments? is this understanding correct? inside one segment, if the flight stops over once, (for example, from Toronto to Las Vegas, if the flight stops over Denvor), then that means this segment has two legs?
Laxmi Raghu
Ranch Hand

Joined: Feb 16, 2005
Posts: 218
I cannot find the clear definition in the dictionary. Please help me. one way trip is just one segment, round trip is two segments? is this understanding correct? inside one segment, if the flight stops over once, (for example, from Toronto to Las Vegas, if the flight stops over Denvor), then that means this segment has two legs?

Segment means - a discreet portion of a trip.

For example: If u r travelling from Toronto to Las Vegas with a stop over in Denvor , then
Toronto - Devnvar - 1 segment
Denvar to Las Vegas - 1 segment

Total 2 segments for forward journey and 2 segments if take same path for return journey.

There is a thread that discusses leg and segments. U can refer it.

http://www.coderanch.com/forums/

Hope this helps.
Emma Yu
Greenhorn

Joined: Jan 29, 2004
Posts: 17
thank you. it is very helpful. so segment and leg are the same meaning, is this understanding correct?
Laxmi Raghu
Ranch Hand

Joined: Feb 16, 2005
Posts: 218
As far i'm concerned they are the same.
kavita varun
Greenhorn

Joined: Oct 15, 2005
Posts: 14
I am trying to understand how segment and leg can be same. If segment and leg are same that means it is one flight (TL123) which goes from Toronto to Las Vegas or is it two flights ?

Two flights one way -
If those are two flights(T-D and D-L) then I have to book two tickets
for one way journey and 4 tickets for return journey.

One flight one way -
If it is one flight one way and I am booking one ticket from Denver to Las Vegas but using second segment of the flight, I will be paying different money. As there are multiple prices for the same flight, a flight 'uses' a price class to define the price based on the segment choosen by the itinerary.

Designing is interesting..
Laxmi Raghu
Ranch Hand

Joined: Feb 16, 2005
Posts: 218
***********
I am trying to understand how segment and leg can be same. If segment and leg are same that means it is one flight (TL123) which goes from Toronto to Las Vegas or is it two flights ?
**********
As far asmy understanding goes. segment and flight are the same. Ifyou take direct flight from Toronto to Las Vegas, then segment and itnerary have 1:1 relationship.

********
Two flights one way -
If those are two flights(T-D and D-L) then I have to book two tickets
for one way journey and 4 tickets for return journey.
***********

You will be booking one ticket for forward journey and one ticket for return journey. But ticket has separate leaves for each segment of the flight (similar to order line item) and a price for that segment. Total cost for the journey will be represented by Itinerary class which holds it as an attribute irrespective of whether it takes two different flights or one flight.

********
One flight one way -
If it is one flight one way and I am booking one ticket from Denver to Las Vegas but using second segment of the flight, I will be paying different money. As there are multiple prices for the same flight, a flight 'uses' a price class to define the price based on the segment choosen by the itinerary.
*********

Do you need a separate price class? Won't it go as an attribute to segment class?
Laxmi Raghu
Ranch Hand

Joined: Feb 16, 2005
Posts: 218
Sorry in my previous post, i mean segment and leg are the same.
kavita varun
Greenhorn

Joined: Oct 15, 2005
Posts: 14
**You will be booking one ticket for forward journey and one ticket for return journey. But ticket has separate leaves for each segment of the flight (similar to order line item) and a price for that segment. Total cost for the journey will be represented by Itinerary class which holds it as an attribute irrespective of whether it takes two different flights or one flight.**

If I have two leaves that means once i get in the flight and if the flight stops at Denver then I am not suppose to get out and walk/stroll ..If I have to go out and walk i should keep my 'boarding pass' with me all the time...this logic makes sense.


**Attribute or the price class **
So is it two attributes or one attribute for the price class. Two because there are two rates for the flight one for first class and our class (architect's class !)

**segment and leg have 1:1 relationship.***
Did it mean that there is a situation where segment and leg have 1:n relationship ?
Laxmi Raghu
Ranch Hand

Joined: Feb 16, 2005
Posts: 218
***********
If I have two leaves that means once i get in the flight and if the flight stops at Denver then I am not suppose to get out and walk/stroll ..If I have to go out and walk i should keep my 'boarding pass' with me all the time...this logic makes sense.
***********
But in real scenario it's not that way right? You have separate ticket leaves for each segment and you need to take separate boarding pass whenever you change segment. This is my personal experience where in i traveled from Bangalore to Washigton DC (IDA). At that time, we changed flight in Frankfrut. I had separate tickets for Blr - Frf and then Frf - WDC. We boarded a different flight in FRF.

**Attribute or the price class **
tHERE WILL TWO Attributes to represents first class or coach.

**segment and leg have 1:1 relationship.***
Did it mean that there is a situation where segment and leg have 1:n relationship ?

No. Not that. If it's a direct flight, then segment and flight are the same. But always as per my assumption, segment and leg are one and the same.
kavita varun
Greenhorn

Joined: Oct 15, 2005
Posts: 14
Here is an attempt of real world scenarios which can happen for flight and airplane

1. A flight going from Toronto to Las Vegas can stop at Denver. You have same flight number TOLA123. You do not come out of the flight. The plane is halting for passengers getting in and out only. Depending on the destination travelled you pay different amounts.

2. A flight going from Toronto to Las Vegas can stop at Denver. You have same flight number you leave your luggage inside 'come out get in' all allowed but passengers from Toronto take the boarding pass and use it for reentry , get one ticket and the flights are two in the system. One is TOLA123 and second is DELA123, airplane is same.

3. Two flights going from Tornto to Las Vegas you have to get down and get in into a new airplane - it is simple as two flights, two airplanes, two tickets and offcourse two classes.
Emma Yu
Greenhorn

Joined: Jan 29, 2004
Posts: 17
I am still doubt about the definition of segment. if we assume toronto->Denvor, Denvor->LasVegas as two segments for the one way trip toronto->LasVegas, then when the customer changes the itinerary and selects the segment, they can choose denvor->LasVegas. But in real world, we are not allowed to do so.
Laxmi Raghu
Ranch Hand

Joined: Feb 16, 2005
Posts: 218
As i mentioned earlier, segment is a discreet portion of a trip.

For example, a person is travelling from India to US (Washigton DC). There is no direct flight and he has to choose from the following options that suit best to him.

India (Bangalore) to Frankfrut (1st segment)
Frnkfrut - Washigton DC (2nd segment)

Other choice whould be

India (Chennai ) to Frankfrut (1st segment)
Frankfrut to Wahigton DC (2nd Segement)

Assume that initially customer had booked ticket from Bangalore to Frankfrut and frankfrut to Washigton. Later he changed his mind and wants to travel from Chennai to frankfrut and frankfrut to washigton. So, he requests for a change in his itinerary for his first segment.

So, what will be done internall is:

Segment from Bangalore to frankfrut is deleted

and

a new segment chennai to frankfrut is created. This is nothing but preparing a new itinerary.

Hope my explanation is helpful.

Other ranchers, pls help Emma YU in clarifying the segmenet issue if mine explanation is not good enough.
Jim Janssens
Ranch Hand

Joined: Sep 24, 2004
Posts: 210
Regardless of the segment issue, does any one else has a problem with the fact that one equipment points to one flight only ?

I agree that one flight can have only one equipment. But an equipment can have several flights, no ? But not at the sime time...
So if I would search the flights associated with equipment X, I can get multiple flights.

Ex.

Flight001 uses equipment A today for london - new york
Flight002 uses equipment A tomorrow for new york - london

Any one suggestions ?
Laxmi Raghu
Ranch Hand

Joined: Feb 16, 2005
Posts: 218
***********
Ex.

Flight001 uses equipment A today for london - new york
Flight002 uses equipment A tomorrow for new york - london

Any one suggestions ?

****************

I didn't clearly understand the last example you quoted. But here is another thought.

The relation between a flight and equipment is best compared with a computer. For example, HP's Product Line (PL6J) PCs have n number of computers each with unique id and associated with just 1 computer. It's similar to boeing 767s. There can be n number of flights in boing 767 series but each has it's own id and represented by one flight.

Is my explanation is on any help?
kirupakaran seshachalam
Greenhorn

Joined: Dec 01, 2005
Posts: 7
So at any point of time a segment + flight can always have only one equipment? Is that right?

-Kirupakaran.S
Jesse Jesse
Greenhorn

Joined: Dec 08, 2005
Posts: 10
Yep, that�s near enough to how I see it - although only just started the assignment so not done too much in depth research and have read a few posts. A segment, flight is taken care of by a single equipment (aeroplane).

I see segment as a line item in an itenerary similar to an order line on an order that tracks the passenger, reserved seat etc. In contrast to reading other posts which show a the concept of segment being a take off and landing between two points. I can't see the point of having duplicate information for departure and arrival in segment and flight. Maybe I am missing something here as have not properly thought this through? But I see having a higher level concept such as route which is an aggregation of flights where each flight provides a means for traveling between two points in order to fulfill a defined route.


Any comments would be great.
 
 
subject: what do segment and leg mean?
 
Similar Threads
Are Leg and Segment synonyms?
Itinerary and segment
segment and flight
about departure flight
Passed Part 2/3 with 100