WEBVTT 00:10.990 --> 00:11.660 OK, good. 00:12.100 --> 00:15.940 So that was the exercise, and I hope you enjoyed it. 00:16.750 --> 00:20.380 I think it's a good exercise because it is because it's quite hard. 00:21.460 --> 00:26.560 And I think at this point and of course, we have gone through so much knowledge and now it's time to 00:26.950 --> 00:33.250 consolidate it and hopefully already have started sketching your own solutions to other of the issues 00:33.250 --> 00:34.240 that we talked about. 00:35.560 --> 00:39.160 So before we I'm going to go through one solution to this. 00:39.170 --> 00:41.160 I'm not saying that this is the only solution. 00:41.170 --> 00:44.680 And as I said, I'm not actually a really flight expert here. 00:45.100 --> 00:50.380 So this is an example, but sort of can potentially be many other ways of solving this. 00:50.380 --> 00:56.500 But I'm going to go through one solution and talk you through how I am thinking when I'm doing that, 00:56.500 --> 01:02.700 because I think that's maybe a little bit more important here is the process and not maybe if we ending 01:02.740 --> 01:04.060 up being an exact model. 01:05.470 --> 01:07.720 So let's start at the ground level. 01:08.050 --> 01:13.990 So this is usually why I do I would like to start in the ground level and ground level here is both 01:13.990 --> 01:18.640 that we start talking about the actual objects and that's usually what object oriented development is 01:18.640 --> 01:19.000 about. 01:19.000 --> 01:23.730 You start with the objects and then you find the common features and so on and therefore form the classes. 01:24.220 --> 01:27.610 But here we actually have abstractions in the domain as well. 01:27.880 --> 01:32.560 So we have the kind of core layer which is the backbone of our ports and our links. 01:32.710 --> 01:35.320 And then we have a layer of root things. 01:35.710 --> 01:36.090 Yeah. 01:36.250 --> 01:42.250 So you can have different roots in that backbone and then you can have flights that are travelling routes 01:42.550 --> 01:44.940 and then you can actually book flights. 01:45.220 --> 01:46.910 So that's kind of different obstructions. 01:47.140 --> 01:49.760 That's that's how I think about it when I read this. 01:50.440 --> 01:54.550 So if you don't say that an our link is a direct link between two airports. 01:55.120 --> 01:55.530 Right. 01:58.390 --> 02:04.360 So we have airports out there and we have our links between the airports. 02:04.360 --> 02:06.670 So they are direct links between two airports. 02:07.210 --> 02:09.700 And our links are directed, as you see. 02:09.700 --> 02:11.050 So they have an arrow as well. 02:13.210 --> 02:19.180 So conceptually, Wystan, in a class diagram, we will say that we have an airport and we have an airlink 02:19.480 --> 02:21.760 and there's associations between them. 02:21.770 --> 02:24.360 So there's two associations from hour link to an airport. 02:24.640 --> 02:31.480 So the first have a role on one and its association and which has origin and the second one destination. 02:32.110 --> 02:38.620 So when our link is directed from the origin to the destination, there was also another sentence here 02:38.620 --> 02:44.170 saying that from or they actually continue by saying that from our ports located near the source and 02:44.170 --> 02:45.190 destination cities. 02:45.460 --> 02:51.310 So usually persons say that they would like to go travel between two cities and not between two airports. 02:51.760 --> 02:54.580 And hence each airport needs to have a list of the cities. 02:54.580 --> 02:56.530 They are close by to that airport. 02:58.270 --> 03:01.300 OK, next. 03:01.780 --> 03:05.350 So now we have this class diagram, so now we continue building that up. 03:05.380 --> 03:10.210 So now we've said here, so here's a little bit limited, said all the our ports and our links. 03:11.110 --> 03:18.640 So then we're saying that a route represent a set of connecting links so you can build up a route like 03:18.640 --> 03:25.000 Route A, route B, C, using our links that are connecting the airport. 03:25.750 --> 03:32.740 So, for example, Route A here includes to our links and Route B here includes only one airlink and 03:32.740 --> 03:34.960 Route C includes two links as well. 03:36.130 --> 03:44.050 So Rudy is taking you from YYZ to take a X, right. 03:44.050 --> 03:48.430 And the Route B is taking off from JFK, TJX. 03:48.610 --> 03:58.120 So, so class wise, we are then saying that a route contains a set of possible links. 04:06.000 --> 04:12.900 Then we're saying that a route is the way followed by a flight from its Origin Airport to its destination 04:12.900 --> 04:13.360 airport. 04:14.010 --> 04:18.120 There may be several flights that share the same origin and destination airports. 04:19.380 --> 04:22.730 OK, so we can actually have a taxi here. 04:22.740 --> 04:25.260 We could have three flights following the same route. 04:25.770 --> 04:35.070 So flight one, two, three here is following route versus flight four is following Route B, so a flight 04:35.550 --> 04:36.990 can only have one route. 04:37.380 --> 04:40.920 OK, but a route could be used by multiple flights. 04:45.570 --> 04:52.440 Then we introduce something which is a little bit on here, maybe, but you have to know that you might 04:52.440 --> 04:54.230 have to get your head around a little bit. 04:54.540 --> 05:01.140 So we're saying that a root represent a set of connecting our links that can be used, that can be used 05:01.140 --> 05:04.350 as span's for travel from start to termination. 05:04.350 --> 05:12.000 Using one flight, a passenger may select a subset of our links in a route to form a span from its origin 05:12.000 --> 05:12.840 to destination. 05:13.350 --> 05:14.460 So what is going on here? 05:14.610 --> 05:17.180 So what we're saying is that what I'm flying. 05:17.820 --> 05:24.330 So if I have a flight that have a route that includes two, two separate links, it's actually possible 05:24.330 --> 05:27.090 for me to only use one of them. 05:28.350 --> 05:35.520 So I could actually if I'm going with flight one here and the route is actually that is going from Y, 05:35.520 --> 05:36.910 Y, Z to J. 05:37.330 --> 05:43.650 J, X. I can actually go jump off at JFK if I like. 05:43.660 --> 05:50.040 And if that is the case, I'm using a span that only includes one of the airlines that is actually connected 05:50.040 --> 05:50.680 to the route. 05:51.690 --> 05:57.010 So here we have a concept of a flight that includes a number of possible spans. 05:57.030 --> 06:05.490 So in this case, as Span A includes both the airlines so that if you're using the full flight and not 06:05.490 --> 06:12.120 jumping off and then you could have a span B, which is just using the first link and the span, Cedar's 06:12.120 --> 06:13.830 actually using the second link. 06:15.600 --> 06:16.020 Right. 06:16.470 --> 06:21.630 And then we can have a span the in flight to here, which only included one airlink of course, and 06:21.630 --> 06:22.490 then one span. 06:22.650 --> 06:26.880 So the span is the kind of the bookable object here. 06:27.000 --> 06:29.490 That is what you what a passenger can book. 06:33.330 --> 06:39.380 So if we're introducing this span here, we're saying that if flight have a number of spans and the 06:39.390 --> 06:46.380 spans are also a connection between a route and an airlink, and they are actually a subset of all the 06:46.380 --> 06:52.620 possible, they could both be a subset of all the possible links that are there. 06:52.740 --> 06:57.420 But it can also be combinations of links that it can be multiple links in the span. 06:59.100 --> 07:04.440 OK, and then we're saying that for each band there are several connecting spans which may or may not 07:04.440 --> 07:06.090 be part of the same flight. 07:06.900 --> 07:17.520 OK, what are we then adding so we can saying that if I would like to go to from YYZ to LHR, then I 07:17.520 --> 07:18.420 need to change that. 07:18.420 --> 07:25.680 JFK, if these are the only flights that I can pick from and hence I need to book Spane B for Flight 07:25.680 --> 07:32.000 one and Spane B for fly two, but then go for convenience and there's domain. 07:32.580 --> 07:40.530 Those two spans are said to be connecting because they are actually going they are connected at JFK. 07:41.880 --> 07:47.610 So here is there actually is a connection between two spans that could be potentially part of different 07:47.610 --> 07:48.210 flights. 07:49.150 --> 07:55.860 OK, there will also be a connection between what I saw in the last piece because Bansi as Plan B as 07:55.860 --> 07:56.070 well. 07:59.900 --> 08:08.900 OK, so now we've come up with this, so for just summarize the conceptual declasse diagram here we 08:08.900 --> 08:10.960 see that we have this airport in the alley. 08:10.970 --> 08:17.030 We have a route which have a set of our links and we have a flight that follows the route. 08:17.030 --> 08:25.520 And the flight also have a number of bookable spans, so to speak, that are contain one or many air 08:25.550 --> 08:28.100 links and also related to that route. 08:29.870 --> 08:33.700 So then we're saying that an airplane is assigned to a flight. 08:33.710 --> 08:40.390 So now we are on the flight level and talking about the actual airplane that is going to fly this flight. 08:41.120 --> 08:48.500 So an airplane is assigned to a flight and it contains a set a number of seats, passengers book specific 08:48.500 --> 08:50.600 seats in specific flights. 08:51.530 --> 08:56.360 So now we're talking about a flight and now we're saying that the flight is operated by an airplane 08:56.780 --> 08:59.300 and it contains a number of seats. 09:00.080 --> 09:01.700 So that's the object level. 09:01.700 --> 09:04.370 And then conceptualize this as maybe quite simple. 09:04.710 --> 09:10.220 We're saying that a flight is related to one airplane and the airplane contains seats. 09:17.380 --> 09:21.170 OK, so here's where we are right now. 09:21.760 --> 09:26.470 So something I added here as well that is not mentioned here in the text, but there was mentioning 09:26.480 --> 09:29.860 the text and exercises that flights are also connected to each other. 09:29.860 --> 09:33.640 And also so it's not only dispensed or connected, it's the flights as well. 09:35.290 --> 09:37.650 So now we adding this. 09:37.840 --> 09:43.600 A ticket includes one or two ticket routes, one or two way, which includes one or more ticket units. 09:43.600 --> 09:48.630 A ticket unit defines a seat reservation for a flight corresponding to a particular span. 09:49.390 --> 09:51.710 So that means this basically. 09:51.730 --> 09:53.220 So now we're connecting it together. 09:53.230 --> 09:58.330 So we're saying one ticket includes one ticket route or two if it's a round trip. 09:58.630 --> 10:04.750 And then each ticket route includes one ticket unit per spane per flight that he uses. 10:04.780 --> 10:11.080 So if we want to go from YYZ to LHR, why are JFK in this example using two different flights? 10:11.080 --> 10:14.830 Two different spans will add two different seats in two different airplanes. 10:14.840 --> 10:16.400 We need two different ticket units. 10:18.100 --> 10:18.670 Very good. 10:19.610 --> 10:24.190 So here's the resulting model in my example at least. 10:25.870 --> 10:32.320 So we have passengers are booking tickets, including one or two ticket routes, which include no ticket 10:32.320 --> 10:35.290 units per seat flight and span. 10:35.740 --> 10:40.900 The flight includes an airplane when a number of seats we have routes. 10:41.140 --> 10:48.280 So flight is following a route route one of many outings and the span is a number of owling and the 10:48.280 --> 10:50.040 airlines in connecting the airport. 10:50.980 --> 10:52.800 But again, not that hard, right? 10:54.050 --> 10:55.330 OK, very good. 10:55.690 --> 10:56.320 Not that hard. 10:56.590 --> 10:57.040 Right. 10:57.550 --> 10:59.290 Seeing the next lecture by.