File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Segment and Flight 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 and Flight" Watch "Segment and Flight" New topic
Author

Segment and Flight

sanz nsgha
Ranch Hand

Joined: Jan 18, 2002
Posts: 42
Can anybody tell the different between Segment and Flight?
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
Let's assume you fly from DFW to JFK with a stop at ATL (and you don't change planes there). Then your DFW-JFK flight would have 2 segments: DFW-ATL, and ATL-JFK. The flight number will remain the same for all segments.
sanz nsgha
Ranch Hand

Joined: Jan 18, 2002
Posts: 42
I would like to think that your explanation is right : 1 flight has 2 segments.
But ... if this is the case, why is it that Segment is on a higher level than Flight in the Domain Model? Segment and Flight have one to one relationship in given Model i.e. a Segment has a Flight and a Flight has a Segment?
What actually is the CONTENT of Segment object? In terms of persistence layer, what do you persist for Segment? (For eg. a Flight has the following info to be persisted Flight #, to city, from city, date, time etc)
Also take a look at this:
http://groups.yahoo.com/group/scea_j2ee/message/17513
Let me know your what you think.
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
> why is it that Segment is on a higher level than Flight in the Domain Model?
> Segment and Flight have one to one relationship in given Model i.e.
> a Segment has a Flight and a Flight has a Segment?
That means they put multy-segment flights out of their model. Might be useful if
you need only data abt flights/segments connecting 2 specified airports. Like in
previous example, if you need to get from ATL to JFK, you'll be interested in info
on DFW-JFK flight since it makes a stop at ATL, and you don't care about other
segments of this flights. Flight info is just an attribute for a segment in this
case.
> What actually is the CONTENT of Segment object? In terms of persistence layer,
> what do you persist for Segment?
> (For eg. a Flight has the following info to be persisted Flight #, to city,
> from city, date, time etc)
Basically the same attributes you listed for a flight. Airport codes for segment
origin/destination, dates/times of departure/arrival, flight# + airline (foreign key),
etc.
> Also take a look at this:
> http://groups.yahoo.com/group/scea_j2ee/message/17513
I cant. It requires authentication.
sanz nsgha
Ranch Hand

Joined: Jan 18, 2002
Posts: 42
Thanks!
In that case can we assume, a Segment object will have the following attributes:
segmentId
fromCity
toCity
flightId
Also where will the info regarding the Seat chosen by the customer be stored? Will it be in Itinerary or Segment?
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
Seat# is a piece of itinerary, I think
Nishant Anshul
Ranch Hand

Joined: Sep 10, 2003
Posts: 72
So far we have maintained a sanity not to discuss the internals. The subject here is dangerously close to the actual assignment. Without any dissent to any1, i would say that we should(and must) help each other in understanding of concepts/questions but ATTRIBUTE LEVEL detailing of classes is definitely beyond the line....sorry no intended offence to any1
...i wish we have a diff complexion of the forum then


SCEA-I, BCJP<p>IBM (India)
sanz nsgha
Ranch Hand

Joined: Jan 18, 2002
Posts: 42
No offence but your comments are an example why this forum is so dead and so many questions without answers ...
If you check the subject of the discussion, you will note that we are talking about requirements. We have an assigment but there is nobody we can talk to to confirm the requirements or questions we have. I don't know about you but as a developer and architect, we constantly discuss with business analysts or end-user to clear such questions. Only then a good solution comes up.
Nishant Anshul
Ranch Hand

Joined: Sep 10, 2003
Posts: 72
hi sanz, i m not averse to ur suggestion that we should have a more liberal thinking with regards to assignment. This is also very true that if u dont discuss with the guys, where else one can go...sun doesnt provide any assgnmnt. forum or msg board. U r also rt that we discuss these with customers and here there is no customer
The key thing in the assignment is obv the class relationships domain. So the implementation of flight and segment is paramount. Even apart from this, say e.g if the reqmnt is saying that we should have a response time of x seconds..definitely i would like to share my experiences and get others.
So why not, lets discuss the finer points and leave the level of detailing to individual person if the moderators r okay with that. buddy its a sensitive thing and i withdraw bcz i m not the appropriate 1 to comment.
But i do support ur view. Cheers !!
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11503
    
  95

Hi Sanz & Nishant,
You both have valid points. There is a need to discuss the domain model and to understand how everything works. But the actual assignment does have to be done by each person individually.
I had been watching this topic, and I felt that the questions and answers were reasonable, and that they were not giving away the solutions to the real assignment. So as long as we stay in that area, I am comfortable with the level of detail.
Regarding the comment "so many questions without answers" - I think it is reasonably rare for a question not to get any answers. Sometimes it may take a day or so before there is an answer, but most people do seem to get answers.
Regarding the comment "i withdraw bcz i m not the appropriate 1 to comment" - anyone may comment if they feel a question or answer is out of line. After all if you have paid your money and you are putting in a lot of effort to try and deliver a good solution, you may justifiably feel upset if you feel that anyone is trying to get a solution without working for it, or if you feel that anyone is giving away a solution.
But also regarding the comment "i withdraw bcz i m not the appropriate 1 to comment" - could you do us all a favour and spell out your words? There are many people who visit this site who are very new to the English language, and trying to work out jargon and abbreviations can be difficult.
Thanks and regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
zheng shu
Greenhorn

Joined: Jan 12, 2004
Posts: 12
This is only intented to discuss requirement, for your record
There has been a very useful post on java ranch on the business model:
http://www.coderanch.com/forums/
I used to be able to come to this post from
http://www.bm-one.com/Se/scea2.html (Saloon discussion, topic
flight and segment), but it is gone now. Where I can
find it again?
My view on this is that the business model is not correct.
The Itinerary should contain (one to many) flights.
Each flight contains one equipment (airplane) and
multple segment (or called flight leg). For each of
the segment, the airplane takes off and lands down.
This enables us to model the scenario
that a passager might change airplane during the flight.
So the questions are:
1. is the model corrct?
2. if not, should we correct it as what I said above?
Being an engineer with a structuring mind, I just feel
unconfortable to work with the existing model that does not
seem to be right.
Thanks for you comments, and yes, no discussion on design.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11503
    
  95

Hi Zheng,
Welcome to JavaRanch.
Do you have the sentence "You may not agree with the what the business analyst came up with, but the business analyst is no longer available to discuss the situation." in your instructions?
I believe that Sun may have deliberately made a few mistakes in the instructions. This might be
  • to see how well you follow instructions even when you don't agree with them.
  • to see how well you can think through design flaws, make a good decision on what to do, and the explain it.


  • Yes, I know that those two reasons are contradictory
    I think that if we can use the provided details then we should use them, even if we don't agree with them. But if there are contradictory instructions, or impossible instructions, then we should make a design decision and document it.
    Now I leave it up to you to decide whether you can work with the way flights and segments have been arranged.
    I used to be able to come to this post from
    http://www.coderanch.com/forums/ (Saloon discussion, topic
    flight and segment), but it is gone now. Where I can
    find it again?

    It is possible that this topic violated our requirements that Real Questions must not be discussed and/or our requirement that solutions to the assignment not be discussed. If the post did violate either requirement, it may have been deleted. Or the original poster may have deleted it.
    Regards, Andrew
    zheng shu
    Greenhorn

    Joined: Jan 12, 2004
    Posts: 12
    Andrew,
    sounds confusingly reasonable
    Thanks!
    qing zhong
    Greenhorn

    Joined: Apr 15, 2003
    Posts: 6
    Is there anybody thinking about "flight"? I have been confusing with it a few days. According to BDM in the assignment it's related with date, but I think it should be stable(just related with depature time). I think there should be another business model for the dynamic flight. But I don't know how to name it. Any suggestion?
    zheng shu
    Greenhorn

    Joined: Jan 12, 2004
    Posts: 12
    Originally posted by qing zhong:
    Is there anybody thinking about "flight"? I have been confusing with it a few days. According to BDM in the assignment it's related with date, but I think it should be stable(just related with depature time). I think there should be another business model for the dynamic flight. But I don't know how to name it. Any suggestion?


    Here what I came up with:
    Flight should be indeed stable but they are related to dates and
    cities. However, it is segment that is priced and sold to passages.
    What I imaging is that segments are objects that passages buy.
    There are a lot of segments that can be booksed through the system.
    Thomas Taeger
    Ranch Hand

    Joined: Dec 16, 2002
    Posts: 311
    For me it was most helpfull to refine the BDM in that way that each entity is coloured being eigther master data or activity data, never mixed.

    Maybe you will add entities in order to avoide any mix of master and activity data.
    I am not even sure if I understood the meaning of each entity in the BDM and all relationships between them, because the naming is even worse than in real projects. But I defined each name as I understood it and will use it. I did that in "Assupmtions made".
    tomte.


    www.classic-and-class.com - www.evalulearn.com
    Interfaces are the glue of OO.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Segment and Flight