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

📄 200603101234535.html

📁 软件工程的红包书
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<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="2006327215956798.jpg" tppabs="http://www.itisedu.com/manage/Upload/image/2006327215956798.jpg" border=0></FONT></FONT></FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="200603101234535.html" tppabs="http://www.itisedu.com/phrase/200603101234535.html" target="_new">用例模型</a>是系统既定功能及系统环境的模型,它可以作为客户和开发人员之间的契约。<a href="200604240937105.html" tppabs="http://www.itisedu.com/phrase/200604240937105.html" target="_new">用例</a>是贯穿整个系统开发的一条主线。同一个用例模型即为<a href="200603101518295.html" tppabs="http://www.itisedu.com/phrase/200603101518295.html" target="_new">需求</a><a href="200603110944215.html" tppabs="http://www.itisedu.com/phrase/200603110944215.html" target="_new">工作流</a>程的结果,可当作分析设计工作流程以及测试工作流程的输入使用。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 下图显示了回收机系统用例模型的一部分:</FONT></P>
<P><FONT face=Verdana><IMG src="2006310133021167.gif" tppabs="http://www.itisedu.com/manage/Upload/image/2006310133021167.gif" border=0></FONT></P>
<P><FONT face=楷体_GB2312><a href="200603071221195.html" tppabs="http://www.itisedu.com/phrase/200603071221195.html" target="_new">用例图</a>,显示包含主角和用例的用例模型示例。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 系统建模有许多种方法,每种建模方法可以满足不同的目的。然而,用例模型最重要的作用是将系统行为传达给客户或最终用户。因此,模型必须易于理解。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 可能与该系统交互的用户和任何其他系统都是主角。由于主角代表了系统用户,它们协助界定系统并提供十分明确的系统用途说明。编写用例依据主角的需求来进行。这样就确保该系统成为用户期望得到的系统。</FONT></P>
<P><FONT face=Verdana><STRONG>一、用例模型如何演进</STRONG> </FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 主角和用例都是通过将客户需求及潜在用户当作重要的信息查找到的。找到这些用例和主角后,应对它们作简要说明。在详细说明这些用例之前,客户应<a href="200604161505135.html" tppabs="http://www.itisedu.com/phrase/200604161505135.html" target="_new">复审</a>该用例模型以核实所有的用例和主角都已经找到,并且它们可以提供客户所需要的东西。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在迭代开发环境中,您可以选择用例的子集以便在每个迭代中详细描述。另请参见活动:确定用例的优先级。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 主角和用例找到后,需要详细说明每个用例的事件流。这些说明指出系统与主角交互的方式以及在各个独立用例中系统执行的有关操作。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 最后,对已完成的用例模型(包括用例说明)进行复审,开发人员和客户使用该模型对系统应执行的操作达成一致意见。</FONT></P>
<P><FONT face=Verdana><STRONG>二、避免功能分解</STRONG> </FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用例模型退化导致系统功能分解的情况并不罕见。为避免发生这种情况,必须注意以下故障现象: </FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “小”用例,即对事件流的说明只有一个或少数几个句子。 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; “许多”用例,即用例的数量有好几百,而不是好几十。 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用例名的构造<a href="200603090857555.html" tppabs="http://www.itisedu.com/phrase/200603090857555.html" target="_new">类</a>似于“根据这一特定数据执行本操作”或“利用这一数据执行本功能”等。例如,“在 ATM 机上输入个人识别号”不应建模为 ATM 机的一个单独用例,原因是没有人会使用系统仅执行这一操作。用例是一个完整事件流,它可以产生对主角有价值的东西。 </FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 为避免功能分解,您需要确保该用例模型有助于回答诸如以下的问题: </FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 系统的环境是什么? <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 为什么要建立系统? <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用户在使用系统时希望获得什么? <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 系统将给用户创造什么价值? </FONT></P>
<P><FONT face=Verdana><STRONG>三、非功能性需求</STRONG> </FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 不难发现,用例是一个很好的获取系统功能性需求的方法。但是对于非功能性需求,情况又如何呢?什么是非功能性需求,可以在何处获得它们?</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 非功能性需求通常分为可用性需求、可靠性需求、性能需求以及可替换性需求(另请参阅概念:需求)。它们通常是指定需要符合任意法律法规要求的需求。它们也可以是由于所使用的<a href="200602281634075.html" tppabs="http://www.itisedu.com/phrase/200602281634075.html" target="_new">操作系统</a>、环境平台、兼容性或所采用的任何应用标准等问题产生的设计约束。通常,任何不允许有一个以上设计选项的需求都可以认为是一个设计约束。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 许多非功能性需求适用于一个单独的用例,并且可以在该用例的特征内获得这些需求。在这种情况下,这些需求可以在用例的事件流内获取,或者作为用例的一个特殊需求来获取(请参阅指南:用例)。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 示例:</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在回收机系统中,返还储存项用例的一个特定非功能性需求是:</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 该机器识别储存项的可靠性必须高于 95%。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 通常,功能性需求适用于整个系统。此类需求可以在补充规约中获得(请参阅工件:补充规约)。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 示例:</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在回收机系统中,一个适用于整个系统的非功能性规约是:</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 机器每次只允许一个用户使用。</FONT></P>
<P><FONT face=Verdana><STRONG>四、内容与方式的两难局面</STRONG> </FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 学习如何确定用例应该在哪个明细级别上“开始和结束”是一件比较困难的事情。特征和用例开始于何处,而用例结束和设计开始又在什么地方?我们通常说,用例或<a href="200603061756235.html" tppabs="http://www.itisedu.com/phrase/200603061756235.html" target="_new">软件需求</a>应该规定系统做“什么”而不是“如何”做的问题。以下图为例:</FONT></P>
<P><FONT face=Verdana><IMG src="2006310133118978.gif" tppabs="http://www.itisedu.com/manage/Upload/image/2006310133118978.gif" border=0></FONT></P>
<P><FONT face=楷体_GB2312>一个人的终点是另一个人的起点。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 根据个人背景,您可以使用不同的环境来确定您对“什么”以及“如何”的理解。当决定是否应该将某个细节摈弃于用例模型之外时,需要仔细考虑这一问题。</FONT></P>
<P><FONT face=Verdana><STRONG>五、具体用例和抽象用例</STRONG> </FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 具体用例和抽象用例之间存在一个区别。具体用例由主角来启动,并且构成一个完整的事件流。“完整”意味着该用例的一个实例执行由主角调用的全部操作。</FONT></P>
<P><FONT face=Verdana>&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>)其他用例中,扩展到(请参阅指南:<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>)或<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>(请参阅指南:<a href="javascript:if(confirm('http://www.itisedu.com/phrase/200603101448335.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/200603101448335.html'" tppabs="http://www.itisedu.com/phrase/200603101448335.html" target="_new">用例泛化关系</a>)其他用例。在启动一个具体用例时,也就创建了该用例的一个实例。这一实例还展示了由其关联关系的抽象用例指定的活动。因而,从抽象用例中无法创建单独的实例。</FONT></P>
<P><FONT face=Verdana>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 由于主角在系统中“看见”和启动的是具体用例,因此这两种用例之间的区别非常重要。 </FONT></P>

⌨️ 快捷键说明

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