WEBVTT 00:10.540 --> 00:12.400 OK, welcome back again. 00:13.750 --> 00:19.960 So now we're going to go through an exercise, I'm going to show you the exercise that such, and then 00:19.960 --> 00:24.990 I would like you to post it with you and try to do a solution to it yourself. 00:25.270 --> 00:29.890 And then when you feel comfortable with that, then you should continue to see that, because I'm going 00:29.890 --> 00:31.380 to give you one solution to it. 00:31.390 --> 00:38.170 And as in all the cases, there are no true solutions here, just more like more or less understandable 00:38.170 --> 00:39.100 versions, I will say. 00:39.850 --> 00:44.350 But we're going to go back to our flight example that we already have used to actually here because 00:44.350 --> 00:48.540 we produced an A class, a class model in that we remember that. 00:48.910 --> 00:54.910 So I'm going to use that here as the basis for doing a package structure of that flight model. 00:56.320 --> 00:59.410 So here was the result that I did. 00:59.560 --> 01:00.970 And you probably have done your own. 01:00.970 --> 01:07.230 And of course, you can use that instead, if you like, or you can take any other one example you have. 01:08.380 --> 01:10.270 But here's a number of classes. 01:10.450 --> 01:13.000 Is not a complete domain model. 01:13.000 --> 01:20.290 Probably you probably would like to dig out some more information about what a passenger is and what 01:20.290 --> 01:22.030 a flight is, a little bit more like that. 01:22.030 --> 01:23.290 And there is no attributes and so on. 01:23.590 --> 01:25.580 But let's use this as a basis. 01:26.980 --> 01:34.540 So what I would like to do here is to post a video now and then try to create your package structure 01:34.540 --> 01:35.710 for this class diagram. 01:36.040 --> 01:42.220 But you should keep in mind, as I said, that this domain is a little bit to few classes. 01:42.310 --> 01:48.160 And right now probably you probably could could come up with maybe 20 more classes if you had a real 01:48.160 --> 01:49.210 workshop about this. 01:49.480 --> 01:52.900 But let's keep the example a little bit more simple. 01:53.530 --> 01:59.260 So so the for example, the rule saying that you should have five to nine classes in each package is 01:59.260 --> 02:01.920 maybe not applicable in this situation. 02:02.350 --> 02:03.610 So I think it's fine. 02:03.610 --> 02:09.220 For this example, you maybe just have a two or one or actually two or three classes in each day packages. 02:09.430 --> 02:16.360 So try to think about how a person that is a skilled person in this domain would think about what are 02:16.420 --> 02:18.540 the relevant packages here? 02:19.660 --> 02:25.840 OK, I think it will be like 20 minutes for this supposed to do now look at the class diagram and try 02:25.840 --> 02:30.910 to figure out package structure and also try to derive the dependencies. 02:33.050 --> 02:39.650 And it's also actually a good thing here is to question maybe some of the associations and see whether 02:39.650 --> 02:42.590 they actually should have an navigability that they are missing. 02:43.460 --> 02:49.850 Depending on the package structure dependencies, you find out, OK, like see you back again in about 02:49.850 --> 02:50.630 20 minutes then. 02:55.390 --> 03:00.850 OK, I hope I wasn't too hard, but I also hope it wasn't too easy. 03:01.240 --> 03:02.500 It should be a little bit hard. 03:04.180 --> 03:08.440 If you've done this like 100 times already, then you probably do it in a couple of minutes. 03:08.560 --> 03:12.820 If you've never done it, you might have a little bit trouble coming into the thinking. 03:13.870 --> 03:15.520 But I will go through one example. 03:15.820 --> 03:20.350 Sorry, I will go through one solution now how I would probably do this. 03:21.610 --> 03:23.940 But as I said, it's no one true solution here. 03:24.250 --> 03:26.770 You can probably do it in a couple of different ways that make sense. 03:28.120 --> 03:37.210 Okeydokey, so I would probably think that the ticket taker route ticket unit belongs together in some 03:37.210 --> 03:41.970 way to a package call, which I call tickets here, or ticket management or tickets or something like 03:41.980 --> 03:42.200 that. 03:43.120 --> 03:48.820 I will probably also put in the passenger here, possibly the passenger could have been a package in 03:48.820 --> 03:52.800 his own if we knew more about that concept. 03:52.810 --> 03:58.570 But for this example, I actually put the passenger into the tickets package right now. 03:59.620 --> 04:04.810 Then I will look into the airplane in the seat where we have an aggregation structure saying that the 04:04.810 --> 04:10.630 seats are belonging to the airplane and I will stick them together in what I hear call airplanes. 04:11.380 --> 04:17.980 OK, and we know that there is an association going from the ticket unit to the airplane. 04:17.990 --> 04:20.950 So that already had a navigability in one way here. 04:22.480 --> 04:24.850 Then I will group the flight and the span. 04:25.210 --> 04:30.760 So we said that you could book particular span's in the flight. 04:30.910 --> 04:31.420 Right. 04:31.720 --> 04:35.380 And I would think that they are actually a grouping together here. 04:36.040 --> 04:39.160 So I will group them in a package called flights. 04:40.240 --> 04:44.020 Then I will add on the associations from the ticket units. 04:44.020 --> 04:49.690 So we will have two associations, one association to a flight and one association to particular spans 04:49.690 --> 04:52.810 within that flight that the ticket unit is using. 04:54.310 --> 04:58.090 And we also add on the association from the flight to the airplane. 05:00.070 --> 05:05.620 Then I will say that the route and the link belong together because the route is defined based on a 05:05.620 --> 05:09.430 set of basic links and I will call that packages. 05:09.790 --> 05:14.800 I would call that package routes and add on the association from the span. 05:14.800 --> 05:18.900 So I already have the the navigability s in the model bag. 05:18.940 --> 05:24.520 The class was actually located more to the routes and expanding the time to the routes and the in a 05:24.520 --> 05:25.060 diagram. 05:25.840 --> 05:32.200 But here I think it makes more sense to actually say that the span belongs to the flight subdomain and 05:32.200 --> 05:34.570 the owling in the routes are kept together. 05:35.470 --> 05:41.380 And then lastly, I will add the airport as a separate one, because here I also think that if we would 05:41.380 --> 05:47.740 have continued this, the airport would probably grow as a subdomain with much more other details put 05:47.740 --> 05:48.160 into it. 05:48.640 --> 05:55.540 And then we have the two associated with going from the link to the airport, the Origin and the Destination 05:55.540 --> 05:56.290 Association. 05:57.520 --> 06:02.410 OK, so this would probably be my first sketch. 06:03.100 --> 06:07.870 Let's look and see which package dependencies we would derive based on this. 06:08.620 --> 06:13.030 So based on this, we will have one package dependency between the tickets and the flight. 06:13.270 --> 06:19.420 You know, even if we had two associations going on here, I will have one dependency from tickets to 06:19.420 --> 06:20.140 airplanes. 06:20.440 --> 06:23.200 We will have one dependency from flights to airplanes. 06:23.440 --> 06:26.110 All these are fine from an evaluation point. 06:27.010 --> 06:29.950 And we have one dependency from flight to routes. 06:30.430 --> 06:36.510 However, we will actually get to dependencies in each direction, from airports to routes and for routes 06:36.510 --> 06:37.510 to airport because. 06:37.870 --> 06:38.650 And why was that? 06:38.680 --> 06:43.930 That was because the association didn't have an navigability. 06:45.640 --> 06:52.870 So I would then probably go back to my class model and see whether actually it makes sense to say that 06:52.870 --> 06:59.140 the airlink is pointing to the airports, but not the vice versa, which I think makes sense. 06:59.410 --> 07:04.750 So I would actually probably reduce the class model to something like this and then we can actually 07:04.750 --> 07:07.230 remove the dependency in one of the directions. 07:07.270 --> 07:13.150 So this would be the final package structure with the dependencies based on that class model. 07:14.050 --> 07:19.510 As I said, this is one solution, probably many, but this is how I would think about it when I did 07:19.510 --> 07:19.660 it. 07:21.520 --> 07:22.120 Very good. 07:22.570 --> 07:28.780 So that was the end of that exercise and the possible solution to that example. 07:29.770 --> 07:36.520 See you in the last lecture for this section, which is actually the last lecture of the whole course.