WEBVTT 00:10.340 --> 00:18.440 OK, back again now we're going to talk about generalizations, so that's another type of relation that 00:18.440 --> 00:19.590 you model UML. 00:19.610 --> 00:24.800 So we talked about associations and there are instances which are links and now we're going to make 00:24.800 --> 00:25.790 generalizations. 00:30.220 --> 00:34.990 So generalisations is the way to express general implication. 00:35.020 --> 00:39.690 We talked about that also when we talked about logic and the philosophical foundation. 00:39.970 --> 00:47.380 So this, for example, in predicate logic, says that all X for all X, if X is a man, then X is also 00:47.380 --> 00:47.950 an animal. 00:48.190 --> 00:48.670 Right. 00:52.210 --> 00:56.920 And that is called like the general implication here of saying that man is an animal. 00:58.150 --> 01:02.140 So generally the question becomes generalizations in general. 01:02.620 --> 01:10.630 So let's say that we have notions about different species here and we think that they are all animals. 01:11.140 --> 01:15.460 Some are mammals, some old birds and other types of animals. 01:15.700 --> 01:19.930 And in mammals section, we also have Homo sapiens, elephants, cows and so on. 01:20.500 --> 01:27.580 The generalization relationship is then shown here is sea as a solid line with the non solid triangle 01:27.790 --> 01:28.600 in the parent. 01:28.600 --> 01:37.460 And so animal is the most abstract concept and that is what the arrow is pointing at. 01:38.020 --> 01:42.720 So we have mammals and birds and within mammals we are Homo sapiens, elephants and cows. 01:43.270 --> 01:51.820 So that is the way you are relating concepts when you think that they are specifying a more general 01:51.820 --> 01:52.460 concept. 01:52.900 --> 01:58.750 So the generalization is actually the the uppermost, more abstract concept. 02:01.200 --> 02:06.100 So that's the generalization and the specialization part of the relation. 02:07.200 --> 02:12.540 So if we then talk about the association and links that we had and the kind of the important difference 02:12.540 --> 02:15.360 here between association and links and generalizations. 02:15.750 --> 02:22.770 So in any case here, let's say we have a couple of cows and we have a couple of barns, then we can 02:22.770 --> 02:30.700 have links between those subjects specifying which cow that belongs to, which barn, maybe. 02:31.020 --> 02:31.380 Right. 02:31.830 --> 02:37.800 And then we also have an association between a barn and a cow that states the account of the ownership 02:38.970 --> 02:39.780 or location. 02:41.280 --> 02:48.000 So here we actually have instances out in the world that have that have relations with each other. 02:49.140 --> 02:56.370 However, the generalization a little bit difference because here we have cows and that they are surrounded 02:56.370 --> 02:58.830 by this kind of that it's a set of cows. 02:58.830 --> 03:00.990 And we have a class that describes that set. 03:02.160 --> 03:05.520 Then we have mammals and we have animals and so on. 03:05.910 --> 03:10.160 But we won't have any animals that are only mammals. 03:10.500 --> 03:17.240 They will they will be cows or human beings or other type of the lowest level classes. 03:17.520 --> 03:25.000 That's the wire where they are that that's which class they are instantiated out from. 03:25.380 --> 03:30.060 So I'm not only a mammal, I'm a human being, which is a mammal. 03:30.240 --> 03:35.450 So the generalization is something going on on the class level and not between the objects. 03:35.760 --> 03:36.150 Right. 03:37.720 --> 03:45.760 So it's not instantiated all in the same way as an association, so a cow relates to mammal and mammal 03:45.770 --> 03:50.400 relates to animal, but it's not the actual instances that relate to each other. 03:51.010 --> 03:56.380 So hence, by definition, there are only objects of the lowest level classes in such a structure. 03:57.100 --> 04:04.090 So you cannot actually have an object that is an instantiation of any of the super types in Generalisation 04:04.090 --> 04:04.630 Network. 04:07.310 --> 04:14.390 Hence, that is actually shown by saying that all superordinate classes in the generalisation structure 04:14.390 --> 04:19.760 are what is called abstract, that means that you cannot instantiate them directly. 04:20.620 --> 04:28.330 So you need to subtype them, for example, in this case, we have party, legal entity, person and 04:28.330 --> 04:35.260 legal entity could be a corporation or a state, then the actual instances would be a corporation or 04:35.260 --> 04:36.510 a state or the person here. 04:37.000 --> 04:42.700 We cannot have any instance of a legal entity that could treat it as a legal entity. 04:43.060 --> 04:46.270 But that is just looking at it from another abstract level. 04:46.600 --> 04:53.140 But it's really an extension of either a corporation or a state that is shown in UML. 04:53.500 --> 05:00.100 But by putting the name of the class in italics, that means that that class is abstract and cannot 05:00.100 --> 05:05.600 be directly instantiated in any of its subtypes needs to be instantiated in Stelle. 05:05.620 --> 05:14.620 Instead, you can also and that are shown here on a generalization, say that it's, for example, incomplete. 05:14.620 --> 05:23.830 So you can have different you could describe the analyzation set by saying here and this example that 05:24.190 --> 05:27.610 two types, two subtypes of legal entity are a corporation and states. 05:27.760 --> 05:29.800 But they could potentially be more. 05:30.610 --> 05:31.000 Yeah. 05:34.940 --> 05:41.360 And good, but you can slice the same pie in many different ways, right? 05:42.170 --> 05:49.290 So let's take this example to let's see here that we have a set of accounts. 05:50.090 --> 05:51.650 So these are all tier counts. 05:51.980 --> 05:55.490 And I can slice them in many different or technical ways here. 05:55.490 --> 06:00.440 So I can say that these are like the subtypes, our business accounts and personal accounts. 06:01.100 --> 06:06.800 But if I'm instead saying that the important stuff here is whether they are savings accounts, checking 06:06.800 --> 06:11.720 accounts, money market accounts and so on, then it won't have the same distinction as personal and 06:11.720 --> 06:12.210 business. 06:13.070 --> 06:19.160 So you could actually do a small state that a class could have multiple generalisations sets. 06:19.940 --> 06:24.890 So we could say that an account could have sunk to sometimes pujari the business accounts and personal 06:24.890 --> 06:29.930 accounts or subtable savings accounts, checking accounts and money market account. 06:31.260 --> 06:31.970 That's fine. 06:32.300 --> 06:38.420 Even if I think personally that this type of modeling makes it more abstract and a little bit harder 06:38.420 --> 06:40.510 to to understand. 06:40.730 --> 06:44.420 Maybe you could model this in another way and maybe think about that. 06:44.420 --> 06:47.580 But maybe you should know that it is possible to do it your email. 06:49.070 --> 06:55.130 You can also download or describe what is called the constraints within the curly brackets here. 06:55.130 --> 06:56.780 And you can set and give them a name. 06:56.780 --> 07:03.800 So you can say that the first subsid here I call the liability type and the second is the account type 07:05.090 --> 07:11.210 and the first one is actually complete and disjoint and the second one is incomplete and disjoined. 07:11.630 --> 07:14.540 So disjoined means that they aren't overlapping each other. 07:15.170 --> 07:18.110 Complete means that there are no more subtypes. 07:18.120 --> 07:21.790 So the other one is not overlapping either, but it's incomplete. 07:21.800 --> 07:29.170 So there could be other I'm not covered the whole set of objects here right now in this diagram. 07:30.560 --> 07:37.130 So as I said, so this is kind of a special case of generalization is typically not a thing you start 07:37.130 --> 07:41.750 doing from the very first day, probably because it also makes it a little bit harder to understand. 07:41.750 --> 07:44.570 But you should know that and you might need it. 07:46.430 --> 07:48.010 But this is a very powerful thing. 07:48.020 --> 07:52.880 So what if you need to speak about the type before you have an object to speak about? 07:54.510 --> 07:56.360 So that's very common if you think about it. 07:56.480 --> 07:59.630 So and this is called power types. 07:59.630 --> 08:01.360 And let's start with an example. 08:01.880 --> 08:08.060 So if I would like to say that Maple's tend to grow in the Northern Hemisphere, but this specific tree 08:08.060 --> 08:11.000 is in the south is in South Africa. 08:12.380 --> 08:18.530 So what I then would like to say I would like to say something generically about this species are being 08:18.530 --> 08:22.430 Maple's for saying that they tend to grow in the northern hemisphere. 08:22.700 --> 08:27.380 But then I would like to talk about this specific object of of a maple. 08:27.650 --> 08:31.040 And that specific object actually grows in South Africa. 08:32.030 --> 08:36.620 So here I'm talking about and describing the class level and the object level. 08:37.300 --> 08:42.490 In many situations, we need to describe the class level even if we don't have an object to describe. 08:43.910 --> 08:45.290 And what do you need to do then? 08:45.830 --> 08:48.950 They need to use something that is called power types. 08:49.430 --> 08:55.130 So if we take this example, we can say that we have a tree class and we have a generalization structure 08:55.130 --> 08:58.200 of tree species, which, of course, is incomplete here. 08:58.220 --> 09:03.060 So this is just the example of tree species, maple, apricot and American Al. 09:03.070 --> 09:03.890 All right. 09:04.760 --> 09:11.460 So I can then say that in actual location of a tree, if I have a tree object to speak about is in a 09:11.480 --> 09:14.080 specific EUROPEO graphic location. 09:15.230 --> 09:21.770 But then I can't say anything about generically what Maple's, for example, where they tend to grow 09:23.210 --> 09:25.520 because I cannot put that on a specific object. 09:25.520 --> 09:25.810 Right. 09:26.330 --> 09:33.650 So I need to have something which is OPOWER type, it's called of a tree and I call that tree species 09:33.770 --> 09:35.000 and tree species. 09:35.420 --> 09:37.340 I can see something generically about. 09:37.340 --> 09:45.560 So here I can say that the general location of a tree species called maple is a number of a range of 09:45.560 --> 09:47.090 different geographical locations. 09:48.350 --> 09:53.030 So OPOWER type is shown actually on a class with a stereotype. 09:53.040 --> 10:00.470 So this is a predefined stereotype, Kalpowar type and the same, and the class have the same name as 10:00.470 --> 10:04.690 the generalizations set and it's stereotyped, Ippolito Basson said. 10:04.970 --> 10:10.370 So in this case, the generalization said, Why has the name of tree species and has the power type 10:10.370 --> 10:14.080 also gets the name tree species and stereotyped as palletize? 10:15.170 --> 10:22.400 So what we are doing here, actually, if I should try to explain it in words, it might this meaning 10:22.400 --> 10:28.430 might be look, look a little bit abstract and hard to grasp, but if we take it word for word. 10:28.670 --> 10:33.230 So OPOWER type is a class whose instances are also some. 10:33.310 --> 10:35.290 Classes of another class. 10:37.350 --> 10:43.800 So we're saying that a power type tree species here is a class. 10:44.990 --> 10:50.540 All right, whose instances, because what is the instance of the tree species here, the instance is 10:50.540 --> 10:57.440 called Maple and maple happens to be a subclass of another class that was called tree. 10:58.670 --> 11:05.930 So what is an instance in the left side here is actually the class in the right side. 11:07.190 --> 11:12.170 So a pineapple type is a class, for instance, are also subclasses of another class. 11:12.770 --> 11:19.730 And by doing that construct, then we could describe things about the class on kind of a metal level. 11:20.570 --> 11:24.130 He's not talking about specific objects of that class. 11:24.140 --> 11:28.840 And this is very, very useful and we use it a lot when we do conceptual analysis. 11:29.060 --> 11:33.650 So this is something you should start to try to get your head around, actually, because that will 11:33.650 --> 11:36.760 help you express very much more powerful things. 11:37.640 --> 11:43.760 So the example, again, the maple, which is a tree species, have a general location in North America 11:44.000 --> 11:50.680 and a specific instance is this specific maple and that happens to actually grow in South Africa. 11:53.060 --> 11:55.340 Then there is something called multiple enhancers. 11:55.940 --> 12:01.330 So one class could actually inherit multiple classes. 12:01.340 --> 12:04.660 So you don't have to be involved in just one generalization structure. 12:05.360 --> 12:10.970 So let's say that we have a concept of a boat, we have a concept of a car, and we also have that a 12:10.970 --> 12:12.340 concept of amphibious car. 12:12.740 --> 12:15.290 So a class might specialize more than one class. 12:16.100 --> 12:18.710 So we have then the vehicle may be on the top here. 12:18.710 --> 12:21.380 And then we say that both the car and about our vehicles. 12:21.590 --> 12:25.430 But then we have a combination of a car and a vote, which is an amphibious car. 12:27.770 --> 12:32.630 However, I should say here as well, when we also talked about multiple generalizations sets on the 12:32.630 --> 12:38.570 same class, also multiple inheritance could make the model a little bit hard to grasp. 12:38.840 --> 12:42.000 And there are probably often ways to model around that. 12:42.000 --> 12:45.020 So you can probably express what you like without using multiple Huerter. 12:45.030 --> 12:50.120 So be a little bit careful here because as I said, when you're creating diagrams, the whole purpose 12:50.120 --> 12:56.120 of creating them is not just so you should understand them, is to be a communication tool and then 12:56.120 --> 13:00.380 you should try to keep them as clear and easy as possible. 13:00.380 --> 13:03.080 So make them more easier if is possible to do it. 13:05.000 --> 13:07.070 OK, summary generalizations then. 13:08.450 --> 13:11.030 So we have this generalization example here. 13:11.330 --> 13:19.130 The generalization relationship is shown as a solid line with a bonfield arrowhead pointing at the abstract 13:19.130 --> 13:23.750 class, OK, and the rules of the road generalize. 13:24.320 --> 13:28.970 The roles in this relationship is actually called generalization and that's apparent. 13:28.970 --> 13:31.070 And specialization, which is the child. 13:31.490 --> 13:34.250 And the whole relation is called the general generalization. 13:36.530 --> 13:43.520 A class can have multiple generalizations such which could be constrained and such as incomplete, disjoined 13:43.520 --> 13:43.940 and so on. 13:44.780 --> 13:46.490 And this sets can have a name. 13:46.790 --> 13:52.580 And if they have a name and includes a power type, that name or generalizations that will have the 13:52.580 --> 13:55.190 same name as the class for the power type. 13:55.790 --> 14:02.840 So if needed, a specific class called a power type can be a model for each generalization set and then 14:02.840 --> 14:05.210 it will be stereotyped as a power type as well. 14:06.650 --> 14:12.620 But this is I've shown you here, quite complex examples of how to use generalizations and you should 14:12.620 --> 14:16.160 know about them at least as a model or a facilitator or workshops. 14:16.160 --> 14:23.240 But it should be a little bit careful when you're using them and also in general terms, using generalizations 14:23.240 --> 14:30.140 and also applies to packaging later on could get you quite lost or at least your audience. 14:31.280 --> 14:35.090 So be a little bit to think about when you use them. 14:35.750 --> 14:38.810 So I think this is a very good example of this. 14:39.320 --> 14:47.990 So allegedly this text came from and taxonomy in the animal kingdom and it's been attributed to an ancient 14:48.200 --> 14:49.320 Chinese and so be. 14:50.810 --> 14:55.820 Celestial emporium of the benevolent benevolent knowledge. 14:57.590 --> 15:04.110 So this is like this on those remote pages, is it written that animals are divided into a those that 15:04.110 --> 15:13.590 belong to the Emperor B and bold ones, C, those that are trained, D, suckling pigs, E, mermaids, 15:13.830 --> 15:20.000 F, fabulous ones, G, stray dogs, h, those are included in this classification levels. 15:20.010 --> 15:29.070 Strange I those that tremble as if they were mad j innumerable once k those drawn with a very fine camel's 15:29.070 --> 15:29.640 hairbrush. 15:30.120 --> 15:39.060 L others like that's kind of generically m those that have just broken a flower ways and and those that 15:39.060 --> 15:44.330 resembles flies from a distance which could become anything if the distance is far away enough. 15:45.090 --> 15:51.660 So just to this example shows you that if you're trying to make generalizations and grouping come out 15:51.660 --> 15:58.140 of a larger set into subsets, you can end up in very strange classifications that maybe make sense 15:58.140 --> 16:03.300 to you, but might not be sensible for others to understand and grasp. 16:04.740 --> 16:05.280 Very good. 16:05.760 --> 16:08.990 So that most generalizations, we're making good progress here. 16:09.390 --> 16:15.540 So now we're going to go into the actual last element, the amount that we're using, and that's packages. 16:16.380 --> 16:17.400 Great zero.