OK, good.
So that was the exercise, and I hope you enjoyed it.
I think it's a good exercise because it is because it's quite hard.
And I think at this point and of course, we have gone through so much knowledge and now it's time to
consolidate it and hopefully already have started sketching your own solutions to other of the issues
that we talked about.
So before we I'm going to go through one solution to this.
I'm not saying that this is the only solution.
And as I said, I'm not actually a really flight expert here.
So this is an example, but sort of can potentially be many other ways of solving this.
But I'm going to go through one solution and talk you through how I am thinking when I'm doing that,
because I think that's maybe a little bit more important here is the process and not maybe if we ending
up being an exact model.
So let's start at the ground level.
So this is usually why I do I would like to start in the ground level and ground level here is both
that we start talking about the actual objects and that's usually what object oriented development is
about.
You start with the objects and then you find the common features and so on and therefore form the classes.
But here we actually have abstractions in the domain as well.
So we have the kind of core layer which is the backbone of our ports and our links.
And then we have a layer of root things.
Yeah.
So you can have different roots in that backbone and then you can have flights that are travelling routes
and then you can actually book flights.
So that's kind of different obstructions.
That's that's how I think about it when I read this.
So if you don't say that an our link is a direct link between two airports.
Right.
So we have airports out there and we have our links between the airports.
So they are direct links between two airports.
And our links are directed, as you see.
So they have an arrow as well.
So conceptually, Wystan, in a class diagram, we will say that we have an airport and we have an airlink
and there's associations between them.
So there's two associations from hour link to an airport.
So the first have a role on one and its association and which has origin and the second one destination.
So when our link is directed from the origin to the destination, there was also another sentence here
saying that from or they actually continue by saying that from our ports located near the source and
destination cities.
So usually persons say that they would like to go travel between two cities and not between two airports.
And hence each airport needs to have a list of the cities.
They are close by to that airport.
OK, next.
So now we have this class diagram, so now we continue building that up.
So now we've said here, so here's a little bit limited, said all the our ports and our links.
So then we're saying that a route represent a set of connecting links so you can build up a route like
Route A, route B, C, using our links that are connecting the airport.
So, for example, Route A here includes to our links and Route B here includes only one airlink and
Route C includes two links as well.
So Rudy is taking you from YYZ to take a X, right.
And the Route B is taking off from JFK, TJX.
So, so class wise, we are then saying that a route contains a set of possible links.
Then we're saying that a route is the way followed by a flight from its Origin Airport to its destination
airport.
There may be several flights that share the same origin and destination airports.
OK, so we can actually have a taxi here.
We could have three flights following the same route.
So flight one, two, three here is following route versus flight four is following Route B, so a flight
can only have one route.
OK, but a route could be used by multiple flights.
Then we introduce something which is a little bit on here, maybe, but you have to know that you might
have to get your head around a little bit.
So we're saying that a root represent a set of connecting our links that can be used, that can be used
as span's for travel from start to termination.
Using one flight, a passenger may select a subset of our links in a route to form a span from its origin
to destination.
So what is going on here?
So what we're saying is that what I'm flying.
So if I have a flight that have a route that includes two, two separate links, it's actually possible
for me to only use one of them.
So I could actually if I'm going with flight one here and the route is actually that is going from Y,
Y, Z to J.
J, X. I can actually go jump off at JFK if I like.
And if that is the case, I'm using a span that only includes one of the airlines that is actually connected
to the route.
So here we have a concept of a flight that includes a number of possible spans.
So in this case, as Span A includes both the airlines so that if you're using the full flight and not
jumping off and then you could have a span B, which is just using the first link and the span, Cedar's
actually using the second link.
Right.
And then we can have a span the in flight to here, which only included one airlink of course, and
then one span.
So the span is the kind of the bookable object here.
That is what you what a passenger can book.
So if we're introducing this span here, we're saying that if flight have a number of spans and the
spans are also a connection between a route and an airlink, and they are actually a subset of all the
possible, they could both be a subset of all the possible links that are there.
But it can also be combinations of links that it can be multiple links in the span.
OK, and then we're saying that for each band there are several connecting spans which may or may not
be part of the same flight.
OK, what are we then adding so we can saying that if I would like to go to from YYZ to LHR, then I
need to change that.
JFK, if these are the only flights that I can pick from and hence I need to book Spane B for Flight
one and Spane B for fly two, but then go for convenience and there's domain.
Those two spans are said to be connecting because they are actually going they are connected at JFK.
So here is there actually is a connection between two spans that could be potentially part of different
flights.
OK, there will also be a connection between what I saw in the last piece because Bansi as Plan B as
well.
OK, so now we've come up with this, so for just summarize the conceptual declasse diagram here we
see that we have this airport in the alley.
We have a route which have a set of our links and we have a flight that follows the route.
And the flight also have a number of bookable spans, so to speak, that are contain one or many air
links and also related to that route.
So then we're saying that an airplane is assigned to a flight.
So now we are on the flight level and talking about the actual airplane that is going to fly this flight.
So an airplane is assigned to a flight and it contains a set a number of seats, passengers book specific
seats in specific flights.
So now we're talking about a flight and now we're saying that the flight is operated by an airplane
and it contains a number of seats.
So that's the object level.
And then conceptualize this as maybe quite simple.
We're saying that a flight is related to one airplane and the airplane contains seats.
OK, so here's where we are right now.
So something I added here as well that is not mentioned here in the text, but there was mentioning
the text and exercises that flights are also connected to each other.
And also so it's not only dispensed or connected, it's the flights as well.
So now we adding this.
A ticket includes one or two ticket routes, one or two way, which includes one or more ticket units.
A ticket unit defines a seat reservation for a flight corresponding to a particular span.
So that means this basically.
So now we're connecting it together.
So we're saying one ticket includes one ticket route or two if it's a round trip.
And then each ticket route includes one ticket unit per spane per flight that he uses.
So if we want to go from YYZ to LHR, why are JFK in this example using two different flights?
Two different spans will add two different seats in two different airplanes.
We need two different ticket units.
Very good.
So here's the resulting model in my example at least.
So we have passengers are booking tickets, including one or two ticket routes, which include no ticket
units per seat flight and span.
The flight includes an airplane when a number of seats we have routes.
So flight is following a route route one of many outings and the span is a number of owling and the
airlines in connecting the airport.
But again, not that hard, right?
OK, very good.
Not that hard.
Right.
Seeing the next lecture by.