⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 200603071221195.html

📁 软件工程的红包书
💻 HTML
字号:
<html>
<head><title>用例图</title></head>
<center><h1>用例图</h1></center>
<div><P align=right><FONT face=Verdana><FONT color=#f70938><FONT face=黑体><a href="200604112229525.html" tppabs="http://www.itisedu.com/phrase/200604112229525.html" target="_new">中科永联</a>高级技术培训中心(</FONT><FONT face=黑体>www.itisedu.com</FONT><FONT face=黑体>)<IMG src="200632721120142.jpg" tppabs="http://www.itisedu.com/manage/Upload/image/200632721120142.jpg" border=0></FONT></FONT></P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="200603071221195.html" tppabs="http://www.itisedu.com/phrase/200603071221195.html" target="_new">用例图</a>(<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200604231323515.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200604231323515.html'" tppabs="http://www.itisedu.com/phrase/200604231323515.html" target="_new">use case diagram</a>)就是由主角、<a href="200604240937105.html" tppabs="http://www.itisedu.com/phrase/200604240937105.html" target="_new">用例</a>以及它们之间的关系构成的图。该图说明了<a href="200603101234535.html" tppabs="http://www.itisedu.com/phrase/200603101234535.html" target="_new">用例模型</a>中的关系。</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 可以将用例图组织到用例包中,并归用例包所有,让特定包中仅显示互为关联关系的内容。</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用例图由参与者(Actor)、用例(<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200603042249305.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200603042249305.html'" tppabs="http://www.itisedu.com/phrase/200603042249305.html" target="_new">Use Case</a>)、系统边界、箭头组成,用画图的方法来完成。 </P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 参与者不是特指人,是指系统以外的,在使用系统或与系统交互中所扮演的角色。因此参与者可以是人,可以是事物,也可以是时间或其他系统等等。还有一点要注意的是,参与者不是指人或事物本身,而是表示人或事物当时所扮演的角色。比如小明是图书馆的管理员,他参与图书馆管理系统的交互,这时他既可以作为管理员这个角色参与管理,也可以作为借书者向图书馆借书,在这里小明扮演了两个角色,是两个不同的参与者。参与者在画图中用简笔人物画来表示,人物下面附上参与者的名称。</FONT></P>
<P><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN></FONT></P>
<P align=center><FONT face=Verdana><IMG src="2006327211212813.jpg" tppabs="http://www.itisedu.com/manage/Upload/image/2006327211212813.jpg" border=0></FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用例是对包括变量在内的一组动作序列的描述,系统执行这些动作,并产生传递特定参与者的价值的可观察结果。这是<a href="200602271429302.html" tppabs="http://www.itisedu.com/phrase/200602271429302.html" target="_new">UML</a>对用例的正式定义,对我们初学者可能有点难懂。我们可以这样去理解,用例是参与者想要系统做的事情。对于对用例的命名,我们可以给用例取一个简单、描述性的名称,一般为带有动作性的词。用例在画图中用椭圆来表示,椭圆下面附上用例的名称。</FONT></P>
<P><FONT size=3><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN></FONT></P>
<P align=center><FONT face=Verdana><IMG src="2006327211221379.jpg" tppabs="http://www.itisedu.com/manage/Upload/image/2006327211221379.jpg" border=0></FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 系统边界是用来表示正在建模系统的边界。边界内表示系统的组成部分,边界外表示系统外部。系统边界在画图中方框来表示,同时附上系统的名称,参与者画在边界的外面,用例画在边界里面。因为系统边界的作用有时候不是很明显,所以我个人理解,在画图时可省略。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 箭头用来表示参与者和系统通过相互发送信号或<a href="200603090938465.html" tppabs="http://www.itisedu.com/phrase/200603090938465.html" target="_new">消息</a>进行交互的关联关系。箭头尾部用来表示启动交互的一方,箭头头部用来表示被启动的一方,其中用例总是要由参与者来启动。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用例图主要的作用有三个:(1)获取<a href="200603101518295.html" tppabs="http://www.itisedu.com/phrase/200603101518295.html" target="_new">需求</a>;(2)指导测试;(3)还可在整个过程中的其它<a href="200603110944215.html" tppabs="http://www.itisedu.com/phrase/200603110944215.html" target="_new">工作流</a>起到指导作用。</FONT></P>
<P><FONT face=Verdana><STRONG><SPAN style="COLOR: blue">□ </SPAN>元素之间的关系</STRONG></FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用例图中包含的元素除了系统边界、角色和用例,另外就是关系。关系包括用例之间的关系,角色之间的关系,用例和角色之间的关系。 </FONT></P>
<P><FONT face=Verdana><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1、角色之间的关系:</STRONG></FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 角色之间的关系。由于角色实质上也是<a href="200603090857555.html" tppabs="http://www.itisedu.com/phrase/200603090857555.html" target="_new">类</a>,所以它拥有与类相同的关系描述,即角色之间存在<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200603101456365.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200603101456365.html'" tppabs="http://www.itisedu.com/phrase/200603101456365.html" target="_new">泛化关系</a>,泛化关系的含义是把某些角色的共同行为提取出来表示为通用的行为。 </FONT></P><FONT face=Verdana>
<P><BR><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2、用例之间的关系:</STRONG> </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="javascript:if(confirm('http://www.itisedu.com/phrase/200603101434215.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200603101434215.html'" tppabs="http://www.itisedu.com/phrase/200603101434215.html" target="_new">包含关系</a>:基本用例的行为包含了另一个用例的行为。基本用例描述在多个用例中都有的公共行为。包含关系本质上是比较特殊的依赖关系。它比一般的依赖关系多了一些语义。在包含关系中箭头的方向是从基本用例到包含用例。在UML1.1中用例之间是使用和扩展这两种关系,这两种关系都是泛化关系的版型。在UML1.3以后的版本中用例之间是包含和扩展这两种关系。</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 泛化关系:代表一般于特殊的关系。它的意思和<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200604240957495.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200604240957495.html'" tppabs="http://www.itisedu.com/phrase/200604240957495.html" target="_new">面向对象程序设计</a>中的继承的概念是类似的。不同的是继承使用在实施阶段,泛化使用在分析、设计阶段。在泛化关系中子用例继承了父用例的行为和含义,子用例也可以增加新的行为和含义或者覆盖父用例中的行为和含义。</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="javascript:if(confirm('http://www.itisedu.com/phrase/200603101440455.html  \n\nThis file was not retrieved by Teleport Pro, because it was unavailable, or its retrieval was aborted, or the project was stopped too soon.  \n\nDo you want to open it from the server?'))window.location='http://www.itisedu.com/phrase/200603101440455.html'" tppabs="http://www.itisedu.com/phrase/200603101440455.html" target="_new">扩展关系</a>的基本含义和泛化关系类似,但在扩展关系中,对于扩展用例有更多的规则限制,基本用例必须声明扩展点,而扩展用例只能在扩展点上增加新的行为和含义。与包含关系一样,扩展关系也是依赖关系的版型。在扩展关系中,箭头的方向是从扩展用例到基本用例,这与包含关系是不同的。 </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用例的泛化、包含、扩展关系的比较。一般来说可以使用“is a”和“has a”来判断使用那种关系。范化和扩展关系表示用例之间是“is a”关系,包含关系表示用例之间是“has a”关系。扩展与范化相比多了扩展点,扩展用例只能在基本用例的扩展点上进行扩展。在扩展关系中基本用例是独立存在。在包含关系中在执行基本用例的时候一定会执行包含用例。如果需要重复处理两个或多个用例时可以考虑使用包含关系,实现一个基本用例对另一个的引用。当处理正常行为的变形是偶尔描述时可以考虑只用泛化关系。当描述正常行为的变形希望采用更多的控制方式时,可以在基本用例中设置扩展点,使用扩展关系。扩展关系比较难理解,如果把扩展关系看作是带有更多规则限制的泛化关系,可以帮助理解。通常先获得基本用例,针对这个用例中的每一个行为提问:该步骤会出什么差错?该步骤有不同的情况吗?该步骤的工作怎样以不同的方式进行等,把所有的变化情况都标识为扩展。通常基本用例很容易构造,而扩展用例需要反复分析、验证。当我们发现已经存在的两个用例间具有某种相似性时,可以把相似的部分从两个用例中抽象出来单独作为一个用例,该用例被这两个用例同时使用,这个抽象出的用例和另外两个用例形成包含关系。 </FONT></P>
<DIV align=center><STRONG></STRONG></DIV>
<DIV align=center><STRONG><IMG src="2006327211234252.jpg" tppabs="http://www.itisedu.com/manage/Upload/image/2006327211234252.jpg" border=0></STRONG></DIV>
<DIV align=center><STRONG>USE CASE图</STRONG></DIV>
<DIV align=center><STRONG></STRONG></DIV>
<DIV align=center><STRONG><IMG src="2006327211249189.jpg" tppabs="http://www.itisedu.com/manage/Upload/image/2006327211249189.jpg" border=0></STRONG></DIV>
<DIV align=center><STRONG>USE CASE图</STRONG></DIV>
<DIV align=center><STRONG></STRONG></DIV>
<DIV align=center><STRONG></STRONG>&nbsp;</DIV>
<DIV align=center><STRONG><IMG src="2006327211426339.jpg" tppabs="http://www.itisedu.com/manage/Upload/image/2006327211426339.jpg" border=0></STRONG></DIV>
<DIV align=center><STRONG>USE CASE图</STRONG></DIV>
<DIV align=center><STRONG></STRONG></DIV>
<DIV align=center><STRONG></STRONG>&nbsp;</DIV>
<DIV align=center><STRONG><IMG src="2006327211443708.jpg" tppabs="http://www.itisedu.com/manage/Upload/image/2006327211443708.jpg" border=0></STRONG></DIV>
<DIV align=center><STRONG>USE CASE图</STRONG></DIV>
<DIV align=left><STRONG></STRONG>&nbsp;</DIV></FONT></div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -