aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Segment, flight, Airport 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 "Segment, flight, Airport " Watch "Segment, flight, Airport " New topic
Author

Segment, flight, Airport

Laxmi Raghu
Ranch Hand

Joined: Feb 16, 2005
Posts: 218
I've three classes Segement, Flight and Airport. Segment class holds origin and destination airport. Flight has other details like flight number, capacity, total price etc. Now i'm confused where to link airport to (segement or flight). Logically speaking it should link to Segement.

But i have one more class City which is linkedto airport indicating the cities an airport serves.

With this, if i link segment and airport together, then a segment is serving a city rather than the flight (which may have one or more segments).

Please clarify where should i link airport to - either segment or flight.
kavita varun
Greenhorn

Joined: Oct 15, 2005
Posts: 14
As i understand in your case city is linked to airport. Why would a city link to segment ? An airport will be served by a segment and an airport serves one or more cities.
Laxmi Raghu
Ranch Hand

Joined: Feb 16, 2005
Posts: 218
I didn't understand what you concluded. Pls elaborate.
kavita varun
Greenhorn

Joined: Oct 15, 2005
Posts: 14
**With this**

I thought you mean segment is linked to city may be not. If i read it now may be you where right about the question.

Can we say the segment is 'serving' city but flight is 'offered' for
the segment ?
Laxmi Raghu
Ranch Hand

Joined: Feb 16, 2005
Posts: 218
There is something which is missing i feel.

When we take a flight, it''s flight which is reaching us to destination. Not segment. Segment is internediate stop in the journey.

So, actually it's flight which takes us from origin to destination. If we consider like this, then city should get linked to flight thro' airport.

i'm really confused. can somebody clear this.
kirupakaran seshachalam
Greenhorn

Joined: Dec 01, 2005
Posts: 7
Origin to Destination is a segment and flight just takes you from origin to destination.

So i think u r initially right that segment should have origin and destination rather than a flight!!!
Laxmi Raghu
Ranch Hand

Joined: Feb 16, 2005
Posts: 218
Thanks for the info. I did that way only in my assignment solution. I didn't feel correct to link to flight. Thanks again.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Segment, flight, Airport