1
00:00:02,570 --> 00:00:04,400
接下来,我们就来画一下
2
00:00:06,770 --> 00:00:11,490
安全企业组织的用例图,画在哪里
3
00:00:11,760 --> 00:00:15,320
它是在3-用例这个包下面
4
00:00:15,690 --> 00:00:17,080
这是包的名字
5
00:00:17,090 --> 00:00:18,160
这是图的名字
6
00:00:19,300 --> 00:00:20,330
我们来画一下
7
00:00:21,900 --> 00:00:23,250
这里,3-用例
8
00:00:23,260 --> 00:00:24,730
这个包下面,右键点它
9
00:00:24,740 --> 00:00:27,080
添加一个图
10
00:00:28,010 --> 00:00:29,340
然后选用例
11
00:00:29,580 --> 00:00:30,950
然后图的名字叫什么
12
00:00:32,770 --> 00:00:34,770
安全企业用例
13
00:00:37,430 --> 00:00:39,990
安全企业用例
14
00:00:45,280 --> 00:00:45,510
OK,好
15
00:00:48,130 --> 00:00:49,950
uc package3-用例
16
00:00:49,960 --> 00:00:50,870
安全企业用例
17
00:00:52,120 --> 00:00:52,870
对上了
18
00:00:53,040 --> 00:00:57,890
然后,首先我们加一个边界框
19
00:00:59,210 --> 00:01:00,510
把这个框加进去
20
00:01:02,680 --> 00:01:03,560
这个框在哪里
21
00:01:04,360 --> 00:01:04,990
就这个了
22
00:01:06,840 --> 00:01:11,320
这里,大一点,过来一点
23
00:01:13,020 --> 00:01:18,670
然后这个框这里就是它的组织的名称了
24
00:01:18,680 --> 00:01:25,130
安全企业
25
00:01:25,140 --> 00:01:27,050
然后接下来是执行者
26
00:01:28,080 --> 00:01:29,720
居民、调查员
27
00:01:30,120 --> 00:01:34,710
物理环境、入侵者,4个
28
00:01:35,080 --> 00:01:39,020
这里,居民
29
00:01:44,130 --> 00:01:45,100
调查员
30
00:01:51,040 --> 00:01:52,430
物理环境
31
00:01:56,870 --> 00:01:57,810
入侵者
32
00:02:02,330 --> 00:02:03,450
好,执行者有了
33
00:02:05,060 --> 00:02:05,750
小一点
34
00:02:08,630 --> 00:02:09,720
接下来就用例了
35
00:02:09,850 --> 00:02:12,230
提供应急响应
36
00:02:13,890 --> 00:02:16,390
然后下面
37
00:02:16,400 --> 00:02:18,160
我们把它加进去
38
00:02:39,000 --> 00:02:39,960
医疗
39
00:02:41,190 --> 00:02:43,480
然后是入侵者、火灾
40
00:02:56,480 --> 00:02:59,350
提供(写错字)
41
00:03:25,220 --> 00:03:33,610
火灾
42
00:03:33,620 --> 00:03:36,390
然后这三个就泛化到上面这个
43
00:03:49,450 --> 00:03:54,220
这里它泛化是搞成一棵树一样的
44
00:03:55,570 --> 00:03:57,000
这三个是并在一起的
45
00:03:57,130 --> 00:03:58,710
我们把它调一下
46
00:03:58,720 --> 00:03:59,730
怎么调
47
00:04:00,000 --> 00:04:05,680
右键点这个,这里选树的风格
48
00:04:14,590 --> 00:04:23,160
这个也调
49
00:04:23,880 --> 00:04:24,730
50
00:04:37,770 --> 00:04:38,040
好
51
00:04:42,870 --> 00:04:46,370
然后这边有一个减轻故障的用例
52
00:04:56,030 --> 00:04:59,560
然后它扩展到这个用例,画过来
53
00:04:59,570 --> 00:05:08,900
然后扩展,这里,扩展这里它有个名字
54
00:05:09,820 --> 00:05:12,610
这个不用加就可以的
55
00:05:13,580 --> 00:05:14,690
乱加在这里
56
00:05:16,100 --> 00:05:16,820
没有必要
57
00:05:17,790 --> 00:05:19,340
既然它这里有了
58
00:05:19,350 --> 00:05:21,420
我们就加进去,加在哪里
59
00:05:21,430 --> 00:05:26,180
因为扩展本身它实际上是相当于一种关联
60
00:05:26,980 --> 00:05:28,730
我们就加在它的属性这里
61
00:05:29,600 --> 00:05:31,250
给它命个名就行了
62
00:05:31,740 --> 00:05:32,950
这个名字叫什么
63
00:05:33,600 --> 00:05:35,510
故障事件
64
00:05:35,800 --> 00:05:38,170
我们选中这个
65
00:05:38,500 --> 00:05:46,460
然后这里,故障事件
66
00:05:49,190 --> 00:05:56,760
下来一点,这样
67
00:05:59,580 --> 00:06:01,650
下面还有一个提供调查数据
68
00:06:14,270 --> 00:06:19,320
调查员,往这边挪一点
69
00:06:34,210 --> 00:06:38,110
这样,接下来就要建立
70
00:06:38,120 --> 00:06:39,230
它们之间的关联
71
00:06:40,600 --> 00:06:41,550
画过来
72
00:06:43,290 --> 00:06:45,800
我们要注意到这个图上面
73
00:06:46,010 --> 00:06:48,120
它关联是没有方向的
74
00:06:49,280 --> 00:06:50,430
UML规范里面
75
00:06:50,440 --> 00:06:51,550
包括SysML里面
76
00:06:51,560 --> 00:06:58,050
是没有指定说一定要用箭头
77
00:06:58,060 --> 00:06:59,530
我们前面示例的
78
00:07:00,520 --> 00:07:03,120
我在幻灯片上示例那个是有箭头的
79
00:07:04,080 --> 00:07:07,310
就是说我认为是一种更好的做法
80
00:07:08,150 --> 00:07:14,700
就是说,从主执行者指向用例的
81
00:07:14,710 --> 00:07:16,140
我们就认为是主动的
82
00:07:16,280 --> 00:07:18,990
而用例指向辅执行者是被动的
83
00:07:21,180 --> 00:07:22,690
那么如果说不用箭头的话
84
00:07:25,330 --> 00:07:29,190
一般是把辅助执行者放在右边
85
00:07:30,330 --> 00:07:31,930
然后主执行者放左边
86
00:07:32,450 --> 00:07:34,440
但是这本身还是有问题的,为什么
87
00:07:34,450 --> 00:07:38,050
因为主辅只是针对某个用例而言
88
00:07:38,730 --> 00:07:40,720
针对这个事情上我是主动的
89
00:07:40,730 --> 00:07:42,760
很可能另外一个事情我是被动的
90
00:07:43,900 --> 00:07:47,330
所以你不可能说一个Actor
91
00:07:48,970 --> 00:07:50,310
它就是辅执行者,不一定
92
00:07:50,320 --> 00:07:51,630
可能这个用例
93
00:07:52,270 --> 00:07:54,860
它是主,下一个用例它就是辅了
94
00:07:55,370 --> 00:07:56,560
所以还是得要箭头
95
00:07:56,730 --> 00:07:58,360
但这里既然没有画,我们就算了
96
00:07:58,370 --> 00:07:59,950
就不画了
97
00:08:00,980 --> 00:08:04,670
画过来,选关联
98
00:08:06,770 --> 00:08:07,160
还有吗
99
00:08:13,000 --> 00:08:13,790
哪个
100
00:08:14,330 --> 00:08:15,960
入侵者,火灾
101
00:08:23,650 --> 00:08:24,080
上来
102
00:08:37,710 --> 00:08:40,640
应该是火灾、物理环境
103
00:08:43,320 --> 00:08:44,200
入侵者
104
00:08:50,920 --> 00:08:53,620
好,齐了
105
00:08:53,950 --> 00:08:56,180
然后我们来对齐一下
106
00:08:57,540 --> 00:09:00,270
过来,这三个我们对齐一下
107
00:09:12,080 --> 00:09:14,780
下来一点,好
108
00:09:50,600 --> 00:09:51,920
我们看,对照一下
109
00:09:57,320 --> 00:09:58,150
差不多,就这样
110
00:09:59,600 --> 00:10:05,070
这个就是我们的图17.13
111
00:10:05,880 --> 00:10:07,640
安全企业用例