about summary refs log tree commit diff
path: root/usth/ICT2.7/P2L2 OO Software Engineering and UML Subtitles/16 - Class Diagram: Relationships - lang_en_vs5.srt
blob: ef6550d75f29df12b2c97ea8a05edb52333c53cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
1
00:00:00,130 --> 00:00:02,620
And that's exactly what we're going to look at next,

2
00:00:02,620 --> 00:00:05,630
relationships in the class diagram, how they're represented and

3
00:00:05,630 --> 00:00:08,010
what they mean. First of all relationships as the

4
00:00:08,010 --> 00:00:12,550
name says, describe interactions between classes or between objects in

5
00:00:12,550 --> 00:00:15,510
my system. And we will describe three main types

6
00:00:15,510 --> 00:00:19,060
of relationships. The first one is called a Dependency

7
00:00:19,060 --> 00:00:22,450
relationship. And we can express that as X uses

8
00:00:22,450 --> 00:00:25,840
Y and we represent it with a dashed directed line.

9
00:00:25,840 --> 00:00:28,170
So when we have such a line between two classes

10
00:00:28,170 --> 00:00:31,020
that means that the first class uses the second one. And

11
00:00:31,020 --> 00:00:33,520
we're going to provide an example of a dependency in a

12
00:00:33,520 --> 00:00:37,960
minute. The second type of relationship is an association that can

13
00:00:37,960 --> 00:00:40,880
also be an aggregation. We'll see what the distinction is.

14
00:00:40,880 --> 00:00:43,470
But basically, what this means is that we can express that

15
00:00:43,470 --> 00:00:47,640
as a X has a y. So x contains a

16
00:00:47,640 --> 00:00:50,950
y. And if it is in association, we indicate it with

17
00:00:50,950 --> 00:00:53,570
a solid undirected line. If it's an aggregation,

18
00:00:53,570 --> 00:00:55,740
we indicate it in the same way, but with

19
00:00:55,740 --> 00:00:58,510
a diamond at one of the ends. Finally, the

20
00:00:58,510 --> 00:01:02,740
third type of relationship is what is called Generalization.

21
00:01:02,740 --> 00:01:05,300
And this can be expressed as x is a

22
00:01:05,300 --> 00:01:09,620
y. So this is the relationship that expresses inheritance.

23
00:01:09,620 --> 00:01:13,600
Specialization between two classes. It's represented with a solid

24
00:01:13,600 --> 00:01:16,190
directed line with a large open arrow head at

25
00:01:16,190 --> 00:01:19,030
the end. Going from the more specialized class to

26
00:01:19,030 --> 00:01:21,770
the less specialized class. So going from the subclass to

27
00:01:21,770 --> 00:01:24,740
the super class. So now let's look at each relationship

28
00:01:24,740 --> 00:01:28,360
in more detail using our example, our course management system.