about summary refs log tree commit diff
path: root/usth/ICT2.7/P2L2 OO Software Engineering and UML Subtitles/22 - Class Diagram: Creation Tips - lang_en_vs5.srt
blob: 8aa02046df32acdfbe9c8101d7606f2b1cae84f5 (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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
1
00:00:00,140 --> 00:00:02,320
The last thing that I want to mention about class diagrams is

2
00:00:02,320 --> 00:00:05,830
some creation tips. So something I know based on my experience and the

3
00:00:05,830 --> 00:00:09,300
experience of others, I can recommend to do when creating a class

4
00:00:09,300 --> 00:00:12,780
diagram. So the first tip is to understand the problem. So take the

5
00:00:12,780 --> 00:00:15,070
time to look at the description of the system that you have

6
00:00:15,070 --> 00:00:18,500
to build, to make sure that you understand the domain. That you understand

7
00:00:18,500 --> 00:00:21,230
what you are supposed to build. Because that is going to save you

8
00:00:21,230 --> 00:00:25,550
time later. It's going to help you identify from the beginning, a more relevant

9
00:00:25,550 --> 00:00:28,370
set of entities in the description of the system. This

10
00:00:28,370 --> 00:00:30,730
one might seem trivial but is very important to choose

11
00:00:30,730 --> 00:00:34,910
good class names. Why? Because class names communicate the intent

12
00:00:34,910 --> 00:00:37,770
of the class, and clarify what the class refers to. So

13
00:00:37,770 --> 00:00:40,510
having a good class name allows you, makes it easier, to

14
00:00:40,510 --> 00:00:44,390
create the mapping between the real-world object and the entities in

15
00:00:44,390 --> 00:00:46,610
your model. And of course, it also makes it easier

16
00:00:46,610 --> 00:00:50,100
to understand the system, after the system is built. Third tip,

17
00:00:50,100 --> 00:00:53,480
concentrate on the what. So here, in the class diagram,

18
00:00:53,480 --> 00:00:57,390
we're just representing the structure of the system. We're representing

19
00:00:57,390 --> 00:01:00,150
what is in the system. What are the entities? What

20
00:01:00,150 --> 00:01:03,140
are the characteristics of the entities? We are not focusing

21
00:01:03,140 --> 00:01:06,850
at all, on how things are done. So, be careful.

22
00:01:06,850 --> 00:01:09,430
Don’t think about the how, just think about the what.

23
00:01:09,430 --> 00:01:12,150
Proceed in an itinerary way. So, start with a simple

24
00:01:12,150 --> 00:01:14,910
diagram and refine it. There is no need to identify,

25
00:01:14,910 --> 00:01:17,650
right away, all of the details of the system you need to

26
00:01:17,650 --> 00:01:21,570
build. It is much easier to look at the description, identify an initial

27
00:01:21,570 --> 00:01:24,670
rough class diagram and then refine it, because in this way, you'll

28
00:01:24,670 --> 00:01:27,650
also gather more understanding of the system as you build it, and you'll

29
00:01:27,650 --> 00:01:30,670
most likely end up with a better product at the end. And

30
00:01:30,670 --> 00:01:33,360
if you proceed in this way, then make sure to refine until you

31
00:01:33,360 --> 00:01:36,920
feel the class diagram is complete, until you feel that you represent

32
00:01:36,920 --> 00:01:39,960
the system that you're supposed to build. So your final goal should be

33
00:01:39,960 --> 00:01:41,820
to have a class diagram that is complete.

34
00:01:41,820 --> 00:01:43,870
So it represents all of the relevant entities

35
00:01:43,870 --> 00:01:45,870
in the system and their characteristics, and it's

36
00:01:45,870 --> 00:01:48,170
correct so it represents them in the right way