WEBVTT 00:10.720 --> 00:11.930 OK, very good. 00:12.340 --> 00:14.130 So let's start with you, Mel. 00:14.800 --> 00:18.450 So this is going to be a little bit longer lecture, actually. 00:18.460 --> 00:24.130 We're going to go through the maybe the basic elements within UML. 00:24.370 --> 00:26.170 So we're going to talk about classes. 00:26.500 --> 00:30.970 They're going to talk about the attributes on the classes and instances of classes. 00:31.870 --> 00:35.950 And then in the next lecture, I'm going to talk about associations between classes. 00:35.960 --> 00:41.080 We're going to talk about generalizations between classes, and I'm going to talk about packaging or 00:41.080 --> 00:41.650 classes. 00:43.090 --> 00:44.040 OK, good. 00:44.050 --> 00:44.800 But let's start. 00:46.480 --> 00:55.060 So classes that's actually just maybe a new name for what we talked about so much already in the philosophical 00:55.060 --> 00:55.540 section. 00:56.020 --> 00:57.550 So we have talked about that. 00:57.550 --> 01:04.750 We are having concepts about stuff out in the real world and we are using our language to express those 01:04.750 --> 01:05.320 concepts. 01:05.350 --> 01:11.050 Classes are actually the things you may be using to represent those concepts in our model. 01:11.830 --> 01:19.510 So we can have concepts about, for example, two parties that are making an agreement here, for example. 01:19.870 --> 01:24.460 And I'm just representing the people there because to kind of remind you all that the concepts are something 01:24.460 --> 01:26.110 that we are jointly agreeing on. 01:26.680 --> 01:32.740 So in this situation, we have the concept of a party in agreement and that is represented through each 01:32.740 --> 01:40.280 class is represented the UML Szabolcs with the name indicating the term that we are using for the concepts. 01:40.300 --> 01:45.250 We also talked about in the philosophical section that actually concept don't have a name, but we pick 01:45.250 --> 01:48.750 at least one term to try to point to the concept with. 01:49.900 --> 01:54.520 So here's the class, a class of parties and a class class, a party and class agreement. 01:56.110 --> 01:59.710 So classes then have something that are called compartments. 02:00.370 --> 02:05.890 So compartment holds features such as, for example, attributes that we're going to talk about in the 02:05.890 --> 02:12.340 next slide and compartment can either be hidden as in this latter case with the agreement here or there 02:12.340 --> 02:13.230 could be shown. 02:13.240 --> 02:16.150 But here the compartment is empty, but they are still shown. 02:16.150 --> 02:16.790 You see that. 02:18.460 --> 02:25.180 So that area within the class is called a compartment in UML attributes. 02:25.180 --> 02:27.370 Then the attributes. 02:27.550 --> 02:36.160 They are used to model the non relational properties on the on the concepts so they become attributes 02:36.160 --> 02:37.700 on the class UML. 02:38.050 --> 02:44.560 So again, we have this set of people and they have a joint concept about a car that is pink. 02:45.190 --> 02:50.710 That means that they have a concept of a car and they have a concept of a property called color, and 02:50.710 --> 02:55.320 they think that objects of the concept car could have color and this one is pink. 02:56.350 --> 03:02.710 So that word in Yumba represented asset class with a compartment with the attribute color in it. 03:03.620 --> 03:08.000 Right, so here we have represented the car that could have color. 03:11.700 --> 03:19.170 The attributes instantiation, so in the case where we had the example here, the instantiation would 03:19.170 --> 03:21.630 be pink of the attribute color, right. 03:22.140 --> 03:23.970 Describe the object of the class. 03:24.360 --> 03:31.560 So the objects, a specific car is pink, but the class cars could have the attribute to color. 03:32.640 --> 03:33.720 So here we have that. 03:33.730 --> 03:36.970 So we have this car has a pink color. 03:37.140 --> 03:43.440 So this car points to an object and pink points to an attribute instantiation. 03:44.400 --> 03:44.810 Right. 03:46.290 --> 03:52.800 So attributes could also be said to be of a specific type, for example, date number. 03:53.250 --> 04:01.140 And that is in then in GML stated after the attribute Kolon and then you can specify a type. 04:01.410 --> 04:07.410 So for example, if we have an agreement, one important attribute of an agreement is when it's valid 04:07.410 --> 04:12.110 from that valid from attribute is of the specific type. 04:12.120 --> 04:13.680 In this case, it is a date. 04:14.220 --> 04:14.610 Right. 04:15.300 --> 04:17.910 And it could be valid too, which is also a date. 04:18.360 --> 04:22.820 And it could, for example, have an identify, which could, for example, be of the type of a number. 04:23.220 --> 04:29.490 So of course, dates and numbers are also concepts in some way, but they are also treated as kind of 04:29.670 --> 04:30.840 generic types. 04:32.940 --> 04:36.630 So here we have an agreement with which is a which is a class. 04:36.630 --> 04:44.430 And you smell the class compartment that includes three attributes in each of the attributes have also 04:44.430 --> 04:45.750 stated a type. 04:48.940 --> 04:55.900 So the next election is going to deal with how we conduct workshops to try to elicit concepts and so 04:55.900 --> 05:01.480 on, and when you do that, you usually start off by trying to find the concepts and get them straight 05:01.480 --> 05:04.820 first and then you go into more details like attributes. 05:05.770 --> 05:10.600 The reason for that is also related to talk took part in the philosophical section when we said that 05:11.560 --> 05:17.260 usually you start finding and paying attention to attributes when you have a breakdown case and you 05:17.260 --> 05:18.400 need to start. 05:18.420 --> 05:21.460 You need to first kind of understand the main phenomena here. 05:21.730 --> 05:32.880 To understand where you kind of fail or have success criteria is so obvious then. 05:33.130 --> 05:39.340 So I've said the term big now a number of times and we talked about this massively in the philosophical 05:39.340 --> 05:39.780 section. 05:40.900 --> 05:48.360 So a classifier or a class describes a set of instances that have features in common. 05:48.370 --> 05:53.260 I'm using the word classifier here because classifier is the generic term for a class. 05:53.260 --> 05:58.600 You know, we talked about classifiers when we said what a model is about so that it included classifiers, 05:58.630 --> 05:59.680 events and behaviors. 06:00.460 --> 06:03.190 A class is a specific type of classifier. 06:04.090 --> 06:10.710 So a classifier describes a set, a group of instances that have features in common. 06:11.680 --> 06:19.180 OK, and the special type of an instance that are instances of classes are the ones that we call objects. 06:20.440 --> 06:28.630 So and this is in UML terminology, but it also is very much the same terminology we used in the philosophical 06:28.630 --> 06:29.110 section. 06:29.140 --> 06:33.160 You can see the direct links here going in that direction all the time. 06:36.360 --> 06:40.590 So we said that we have an object here, which is a car, a car. 06:40.630 --> 06:45.850 This car is pink, which is an attribute instantiation of the attribute colors. 06:45.850 --> 06:50.920 You actually used the word instance instantiation, an instance for the attribute as well. 06:51.190 --> 06:57.000 But we call the instance of a of a class like car we call an object. 06:57.040 --> 06:58.240 So that is an object. 06:58.540 --> 07:00.220 And this is an attribute instance. 07:04.800 --> 07:05.250 OK. 07:06.240 --> 07:11.160 The objects in the world are representing you, Mel, as instances of the class. 07:11.640 --> 07:18.210 So I also talked about this when I went through the how you, Mel looks about upon the concept of a 07:18.210 --> 07:18.680 model. 07:19.170 --> 07:24.900 So we said that we could actually have something that was called instance specifications and also a 07:24.900 --> 07:31.160 current specifications and executions so we could actually represent real world objects in the model. 07:31.200 --> 07:36.110 However, the real world objects will not be in the model, but we could represent some aspects on them 07:37.230 --> 07:41.150 so we could represent this specific pink car. 07:41.340 --> 07:46.050 So the pink one and we could also represent the red one. 07:47.190 --> 07:51.680 They then form two different instances in our UML model. 07:52.530 --> 07:57.830 So an instance or an object in this case, this actually applies to most of the instances in UML. 07:57.840 --> 08:05.220 But if we take an object specifically, which is in the instance of a class, is denoted as a box with 08:05.220 --> 08:12.660 an underlined name instead for a class, it's a box, but the name is not underlined. 08:13.080 --> 08:21.900 And also you could, if you like, and you do that usually state the class that it's instantiates after 08:21.900 --> 08:22.590 the kolon. 08:22.830 --> 08:32.010 So the pink one Kolon car says that this is an object which we call the pink one, to make it easier 08:32.010 --> 08:36.030 to reference which actually object out there in the wall that it refers to. 08:37.200 --> 08:41.070 And it is an instance of the class car. 08:41.610 --> 08:43.230 The second one is also an object. 08:43.230 --> 08:44.910 It's another object out in the world. 08:44.910 --> 08:50.010 We call it the red one, but it's also an instance of the same class car. 08:50.610 --> 08:51.060 OK. 08:55.050 --> 09:01.230 Objects could be anomalies, so we can actually have a real world situation here where we have lots 09:01.230 --> 09:07.170 of cars and for the moment or for what we're describing in our model right now, it's not important 09:07.170 --> 09:08.880 to point to a specific car. 09:09.090 --> 09:13.950 We just want to refer to any arbitrary car, maybe. 09:14.550 --> 09:21.750 So then I can just model two different objects, which is which both are instances of the class car, 09:21.900 --> 09:23.700 but I don't put any names on them. 09:23.880 --> 09:27.480 Then they are called anomalies and then I just mean two arbitrary cars. 09:28.620 --> 09:33.120 OK, so the name could be left in blank and that's what I do. 09:33.140 --> 09:40.080 If they are anomalous and I can actually have the other way around so objects can be unclassified. 09:40.410 --> 09:48.150 So I can actually I could model objects before I said that they are instances of a specific class. 09:49.320 --> 09:56.610 And actually this is one of the main features in what is called the object oriented technique that you 09:56.610 --> 10:02.940 usually you can start off just thinking about objects without classifying them. 10:03.150 --> 10:07.650 And then when you start understanding the phenomena of the objects, then you start actually adding 10:07.650 --> 10:11.500 classes and say that those objects are part of the same class and so on. 10:12.390 --> 10:18.700 So this is a very strong idea in the arbitrary, object oriented technique. 10:20.610 --> 10:26.010 So in those two cases here, I have an object which I call X, Y, Z, and I am not with that. 10:26.010 --> 10:27.120 I can call A.B.C.. 10:27.210 --> 10:30.360 I can refer maybe to something out in the real world with them. 10:30.660 --> 10:33.170 But I don't I don't have an idea what it is yet. 10:35.580 --> 10:40.320 So you can actually set the class later in the process and that is nothing you need to do from the very 10:40.320 --> 10:40.920 beginning. 10:40.920 --> 10:45.780 And that is a little bit also when you're thinking kind of if I'm doing this top down means that I first 10:45.780 --> 10:51.570 identified the classes and then I can instantiate them if I'm doing it bottom up first, try to identify 10:51.570 --> 10:56.170 what it's going out there in the real world, and then I'll try to classify it and understand it better. 10:57.330 --> 11:02.460 So objects can both be anomalous and they could be the other way around an unclassified 11:05.580 --> 11:05.970 good. 11:06.090 --> 11:08.770 So if we then take this example again. 11:08.880 --> 11:13.220 So here's my car and it's an instance of a car. 11:14.130 --> 11:20.090 So in the same way that a class could had compartments, I can also have compartments on the objects. 11:20.970 --> 11:26.400 So then in this compartment, I could say that the attribute colour, which was an attribute of the 11:26.400 --> 11:32.360 class car in my specific car that attributes instantiation of being pink. 11:33.630 --> 11:37.260 So here's I'm actually represented that whole thing in UML. 11:37.260 --> 11:43.710 So I've said that the attributes Instantiations describes the objects of the class and this specific 11:45.060 --> 11:47.340 object, which is my car is pink. 11:48.450 --> 11:50.550 OK, not so hard I think. 11:50.700 --> 11:52.830 Hopefully so. 11:53.020 --> 11:58.320 Tried to take them in many steps here and then we'll put it together to a little bit larger piece later. 12:01.080 --> 12:07.470 Then there is something called stereotypes, so stereotypes is something it's a construct that he uses 12:07.470 --> 12:09.120 UML to solve this problem. 12:09.450 --> 12:12.300 So what if I want to classify my classes? 12:13.650 --> 12:16.830 So let's say that I have this and I showed you this model already. 12:17.080 --> 12:22.740 So there is a person here which is a class to be used to represent real world persons like this maybe. 12:23.070 --> 12:28.140 And there is a class called Personal Information, which is used to represent real world information 12:28.230 --> 12:29.190 about persons. 12:29.310 --> 12:29.720 Right. 12:30.300 --> 12:34.760 But let's say that I think that they are a little bit different in nature, aren't they? 12:35.340 --> 12:40.800 Then I can actually add what is called a stereotype so I can say that the person here, that class is 12:40.830 --> 12:47.460 a class of natural kinds and this is a class of information so that I can use those stereotypes as a 12:47.460 --> 12:52.020 meta description of the classes that I have in my model to make them. 12:52.440 --> 12:55.510 It's to kind of enrich to semantics a little bit. 12:58.080 --> 13:03.630 So take a concrete example from when you're doing business models, usually using UML, then there are 13:03.630 --> 13:07.000 three different types of stereotypes that could be used. 13:07.020 --> 13:12.300 So, for example, you can say that a class could be a business entity, a business worker or a business 13:12.300 --> 13:12.810 actor. 13:13.290 --> 13:14.790 And there are other stereotypes as well. 13:14.790 --> 13:16.590 But these are three examples. 13:17.070 --> 13:26.940 So business actors represent people or organization or other agents out there that are acting towards 13:26.940 --> 13:31.710 our business, but they are considered to be outside of our business, whereas business workers are 13:32.070 --> 13:37.800 persons, agents, systems, automated stuff going on in our business that helps our actors to deliver 13:37.800 --> 13:39.720 or delivers the value to our actors. 13:40.380 --> 13:47.700 And then we have business entities which represent kind of the resources that we work with or create 13:48.600 --> 13:52.100 or use as a catalyst during this business logic. 13:52.410 --> 13:57.030 And that could be, for example, agreements or products or assets. 13:58.710 --> 14:04.890 So the the actual stereotype is written in an angle brackets, double angle brackets. 14:05.130 --> 14:10.560 However, you can also use icons for stereotypes in your model so you can actually use a symbol for 14:10.560 --> 14:12.600 the stereotype instead, if you like that. 14:13.260 --> 14:21.360 So you can have this this default notation, which is the angle brackets, business entity, or you 14:21.360 --> 14:23.980 can define an icon for that specific stereotype. 14:23.980 --> 14:32.220 And you studies that and say that this is how we show all and business entities or we can use a combination. 14:32.350 --> 14:39.090 So instead of riding out the stereotype name, you can use the icon in the upper right corner of the 14:39.090 --> 14:39.510 class. 14:41.100 --> 14:47.850 So using this way, we can actually describe UML diagrams in many different ways. 14:47.850 --> 14:52.770 Even if they have exactly the same semantic, they could actually look very different and they could 14:52.770 --> 14:57.930 also be more or less expressive them for different groups of people that looking at them. 14:58.500 --> 15:04.200 So, for example, this is standard notation using the stereotypes of a business actor and the business 15:04.200 --> 15:07.260 worker through a two class customer, a salesperson. 15:07.260 --> 15:07.680 Right. 15:07.680 --> 15:08.910 And they have an association. 15:09.480 --> 15:14.520 Or I can use the icon versions of the stereotypes and then I will have a customer and a salesperson. 15:14.520 --> 15:19.740 So semantically wise, these are excellent, even if they could be more or less expressive maybe in 15:19.740 --> 15:20.410 your diagram. 15:21.060 --> 15:29.070 So that's a very powerful notion of UML and is used in many occasions to enrich the semantics of a specific 15:29.070 --> 15:29.490 class. 15:31.770 --> 15:37.800 So summary then on classis attributes and instances and also stereotypes. 15:39.810 --> 15:47.070 So we have said that classes are rendered as a box with a name indicating the term for the concepts 15:48.180 --> 15:51.870 and elements can be stereotypes stereotyped. 15:52.440 --> 15:58.140 So here we have an agreement with an empty compartment, with a stereotype of being in business entity. 15:59.220 --> 16:00.660 And the agreement is a class. 16:02.640 --> 16:08.740 The attributes which are shown in a compartment could also have type. 16:09.210 --> 16:17.190 So in this example, again, the class agreement here have three attributes valid from valid to an identifier, 16:17.190 --> 16:23.010 and they have two different types of the first to have the same type of being a date and the last one 16:23.010 --> 16:24.530 have the type of being a number. 16:26.340 --> 16:29.520 So we can also represent the objects in Gemal models. 16:29.850 --> 16:35.520 So then they are represented as objects specifications and in this case, or they are also rendered 16:35.880 --> 16:43.110 as a box, but with a different set, the name is are underlined and we can optionally all show if they 16:43.110 --> 16:44.400 are instantiating in class. 16:44.400 --> 16:46.830 We can show that after the call, after the name. 16:47.550 --> 16:54.720 So in this case we have a paper which is of the an instance of the class agreement and we can also then 16:54.720 --> 17:01.260 also show the attribute instantiations so we can show that the three attributes from the class are instantiated 17:01.260 --> 17:05.040 in this object and they have specific values for this object. 17:05.440 --> 17:11.830 So here they are divided from the 2nd of April to the 5th of April with an identifier or two, three, 17:11.830 --> 17:15.370 four, five, six, and that is shown in the object compartment. 17:15.960 --> 17:22.770 So what you see here is mainly the most foundational part, or would you mallis about how you represent 17:22.770 --> 17:24.180 you on diagrams? 17:24.820 --> 17:30.600 So that was classis instances of classes, attributes, stereotypes. 17:31.110 --> 17:36.120 Now we're going to go into the other very important thing here, and that is how classes and objects 17:36.120 --> 17:39.000 are actually relating to each other in associations.