软件工程实验指导书.doc_第1页
软件工程实验指导书.doc_第2页
软件工程实验指导书.doc_第3页
软件工程实验指导书.doc_第4页
软件工程实验指导书.doc_第5页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

软件工具与环境实验讲义院系:信息工程学院开课单位:软件工程教研室编写:杨志武实验一 熟悉微软Visio的环境一、实验目的1) 熟悉微软Visio集成软件工具环境2) 练习利用Visio制图的基本方法3) 理解Visio概念二、实现内容及步骤图1-1.Visio工作窗的结构题目1 Visio基本窗体操作 工具栏的显示与隐藏n 显示工具栏的步骤:choose View Toolbars choose the toolbar you want;n 隐藏工具栏的步骤:choose View Toolbars and uncheck the checked toolbar。(当某工具栏被选中,在菜单ViewToolbars中相应工具栏标题的左侧将有一个选中标志,该工具栏处于隐藏状态时,则没有此标志) 工具栏的移动与停靠n 移动工具栏:click and hold the mouse on the toolbars handle, drag and move the toolbar to a new location. The move handle is a series of dots to the left of a horizontal docked toolbar and along the top of a vertical docked toolbar.n 停靠工具栏:drag the float toolbar to the top, left, right or bottom, release it. Task PaneTask Pane的显示与隐藏: choose View Task Pane(Ctrl+F1)。任务窗(Task panes)位于Visio窗口的右侧, 集中显示一些公共任务,如:creating new drawings, obtaining help, and collaborating with others。 绘图窗绘图窗位于窗口的中部,始终是可视的。可以根据需要显示多个窗体。显示窗体:choose View click the window name. The Drawing Window绘图窗可以有多个Drawing pages,是绘制、修改和格式绘图任务的区域(页) 观看绘图页的不同区域:use the horizontal and vertical scrollbars.显示不同的绘图页:select the tab for that page below the drawing window.To display a grid in the drawing window: choose View Grid. To display rulers: choose View Rulers.To change the ruler units: choose Tools Options and select the Units tab. Click the Change button, choose the units from the Measurement Units drop-down list. The Shapes WindowYou drag and drop shapes from the Shapes window onto a drawing page. The Shapes window contains active stencils and their shapes, docked by default on the left. However, you can reposition the Shapes window or individual stencils to suit your needs. 在Shapes window中添加其他模板:choose File Shapes, and click the stencil you want.显示Shapes window中打开模板中的图形: click the stencils title bar.调整Shapes window的尺寸: drag the vertical divider between the Shapes window and the drawing window to the left or right.改变Shapes window中显示的信息: right-click the Shapes window title bar and choose one of the options, such as Icons Only,from the shortcut menu.同时显示多个模板: Drag a stencil out of the Shapes window and float it on the screen,. Drag a stencil to the top/bottom of the Shapes window to create a second stencil pane. The Drawing ExplorerThe Drawing Explorer, shown in Figure 1-2, offers a hierarchical view of your drawing. You can use the Drawing Explorer to find, add, delete, or edit the components of your drawing, including pages, layers, shapes, masters, styles, and patterns. For example, you can select and highlight a shape on a drawing by double-clicking its name in the Drawing Explorer. To display the Drawing Explorer, choose View Drawing Explorer Window. 图1-2 Drawing Explorer题目2 Creating Drawings File New This is the quickest way to display the Choose Drawing Type pane or create a new drawing of the same type as the current one, particularly when the task pane is hidden. Choose File New Choose Drawing Type to preview and choose the available templates. Choose Drawing Type pane By default, the Choose Drawing Type pane appears when you start Visio. This pane enables you to preview and choose one of Visios templates. New Drawing pane This pane contains links to every method for creating a new drawing. If the task pane is not visible, choose View Task Pane. Click New Drawing in the task pane drop-down list. Creating Drawings Using TemplatesTemplates set up your drawing environment for you. Visio provides you dozens of templates, but you can also find templates on the Web or use custom templates youve built yourself or obtained from someone else.To create a drawing from a template, follow these steps:1) Display the Choose Drawing Type pane by choosing File Choose Drawing Type. You can also click Choose Drawing Type in the New Drawing task pane.2) Click the category for the type of drawing you want to create. Visio displays thumbnails of each type of drawing in that category, as shown in Figure 2-1.3) Click the picture representing the type of drawing you want. 基本绘图工具的使用绘直线、曲线,圆、矩形等图形。 添加/删除Drawing Page Right-click any page tab and choose Insert Page on the shortcut menu. Choose Insert New Page. In the Drawing Explorer window, right-click the Foreground or Background folder and then click Insert Page.To set up a background page, follow these steps:1) Choose Insert New Page.2) Click the Background option and type a name for the new background page in the Name box.3) Make any other page setting changes you want and click OK.4) Add the shapes and text that you want on the new background page.5) To assign the background page to a foreground page, click the page tab for the foreground page and choose File Page Setup.6) Select the Page Properties tab, select the background page name in the7) Background drop-down list, and click OK.题目3 Visio文件操作When you open a Visio file, Visio opens several elements in addition to the drawing page and stencils that you can see: The workspace list saves the files, windows, and window positions from the last work session so that Visio can reset your work environment. Visio includes styles and color palettes associated with the drawing. Visio opens a VBA project, which initially contains an empty class module: ThisDocument. Visio opens a ShapeSheet for the file, which you can use to store information about the file and the shapes within it. Opening Visio DrawingsTo open an existing file, follow these steps:1) Click the Open button on the Standard toolbar, or, choose File Open / press Ctrl+O.2) In the Look In list, browse to the folder that contains the file you want to open. The contents of the folder appear in the dialog box.3) Double-click a file to open it. Saving FilesTo save a file, choose one of the following methods: Press Ctrl+S. Click Save on the Standard toolbar. Choose File Save.To specify save options, choose Tools Options to open the Options dialog box and then choose one or more of the following options: User Information Select the General tab to specify the user name and initials you want Visio to use as the author of drawings. Prompt for Document Properties on First Save Select the Save tab to select the option that prompts for document properties the first time you save a file. Save AutoRecover Info Select the Save tab to specify whether Visio saves your file automatically and, if so, how many minutes elapse between automatic file saves. Default File Type Select the Save tab to choose the file format to which Visio saves by default. The options are to save files as Visio 2003 drawings, Visio XML documents, or Visio 2002 drawings. Default File Locations If you organize your files in specific folders, select the Advanced tab and click the File Paths button to specify the location for drawings, templates, stencils, help files, add-ons, and startup paths. Remove Personal Information from File Properties on Save Select the Security tab to remove the author name, manager name, and company name from file properties when you save a file. Saving Visio FilesYou can use your drawings for different purposes by saving them as different types of Visio files. The following list identifies the types of Visio files you can save and what they represent: Drawing A file that contains pages of shapes and text you use to convey information. Stencil A file that contains master shapes you drag onto drawings. Template A file that Visio copies to create a new drawing. Visio copies into the new drawing any settings, stencils, windows, styles, macros, and other elements you define in the template. Working with Shapes绘制图形:drag and drop masters from stencils onto a drawing page. (Predrawn shapes, called masters, are stored and categorized in stencils).定位Shapes:use Visio tools to snap shapes into position Modifying Shapes Reposition or manipulate them Drag them to another position or use coordinates to place them precisely Rotate or mirror them to the orientation you want Change their size and even modify their shapes Change their position in the stacking order Opening StencilsFirst, open the drawing you want to work on or create a new one. Then, to open astencil, choose File Shapes and then use one of the following methods: Open a built-in stencil Point to a category and choose a stencil. Open a custom stencil Point to My Shapes and choose a stencil. Create a blank stencil Choose New Stencil to add shapes to create your own stencil. Display the document stencil To display a stencil that contains all the shapes on the current drawing, choose Open Document Stencil.实验二 练习绘制基本的UML视图一、实验目的1练习绘制基本的UML视图2进一步熟悉利用Visio绘制UML视图的基本方法3进一步理解Visio软件工具二、实现内容及步骤实验要求:练习利用Visio软件工具绘制下列UML视图。1.练习绘制下面的用例图图2.1 用例视图2.练习绘制类图图2.2 大学机构设置类图3.练习绘制顺序图图2.3 含有时间约束的顺序图图2.4 含有条件约束和循环结构的顺序图4.练习绘制协作图图2.5 协作图5练习绘制状态图图2.6 状态结点的基本结构图2.7 状态图6.练习绘制活动图图2.8 活动图图2.9 含有泳道的活动图7练习绘制包结构图图2.10 含有access衍型的包视图实验三 练习编写用例实验目的:练习独立分析并编写用例实验工具:Windows Word或其他编辑软件实验内容:请详细阅读下面列出的用例的模板,并按照下面给出的用例模板编写给定题目的用例。实验要求:可以独立也可以几个同学合作,完成本次实验。用例模板:场景描述处理销售一个顾客带着商品在收款处准备交费购买。出纳员使用POS终端记录所购买的每一件商品。POS系统给出所应收的总款数以及每件商品的价格细节。顾客键入支付信息,系统进行确认并记录。然后,系统更新商品的存货清单,顾客拿着系统打印出的收条并带着商品离开。处理退货主要的成功场景:顾客带着商品到收款处退货。出纳员使用POS终端记录每一件被退回的商品可选的场景:如果在系统中找不到商品的标识,那么就通知出纳员并建议他手工输入商品的标识码(或许商品的标识已经被损坏);如果系统检测到和外部税金计算系统之间的通信失败,那么就用案UC1:处理销售主要参与者:出纳员受益人及其利益:出纳员:需要精确、快速的输入,并且不出现支付错误。销售人员:需要销售款得到更新。顾客: 需要购买并花费最小的精力得到快速的服务,并需要支持退货功能。公司:需要精确地记录交易并满足客户的利益。需要支付授权服务记录可接受的支付。需要一些容错功能。需要账目和存货清单得到自动的快速更新。政府税务机构:需要从每一次销售中收税。可能有多个税务机构要收税,例如国税局、地税局等。支付授权服务:需要用正确格式和协议传来的数字授权请求。需要精确计算它们可支付给商店的款额。前置条件:出纳员需要身份识别并进行授权。后置条件:储存了销售情况,正确地计算了税金,更新了账目和存货清单,记录了销售额,打印了收据。主要的成功场景:1. 顾客带着商品到POS终端处准备购买。2. 出纳员开始一次新的销售。3. 出纳员输入商品标识码。4. 系统记录销售的商品并给出商品的描述、单价和折扣,并根据某些价格规则计算所应付的款额。出纳员重复步骤3和步骤4,一直到处理完所有商品为止。5. 系统给出所应支付的总款额并计算税金。6. 出纳员告诉顾客总价并请求付款。7. 顾客付款,系统处理支付。8. 系统记录下已完成的销售,并将销售和支付信息发送给外部的账目系统(用于账目和销售额)以及存货清单系统(用来更新存货清单)。9. 系统打印收据。10. 顾客带着收据和商品离开(如果买了商品)。扩展:在系统失败时,要恢复和校正账目,确保所有交易敏感状态及事件能够从场景的任何步骤中恢复。1. 出纳员重启系统和登录,并请求恢复先前的状态。2. 系统重建先前的状态。 2a. 系统检测阻止恢复的异常状态: 1. 系统给出纳员发一个出错信号,记录该错误并进入一个干净的状态。 2. 出纳员开始一次新的销售。3a. 无效的标识码:1. 系统发一个出错信号并拒绝输入。3b. 顾客可能会购买多件相同类别的商品,因此记不记录每件商品的惟一标识码并不重要(例如,5袋洗衣粉): 1.出纳员可以输入商品类别号以及数量3-6a: 顾客请求出纳员从购买的货物中去掉一件商品: 1. 出纳员输入不想要的商品的标识码。 2. 系统显示更新后的总价格。3-6b. 顾客告诉出纳员取消销售: 1 出纳员在系统上取消销售。3-6c. 出纳员中止销售: 1. 系统记录销售,以至在任何一个POS终端都可以检索到。4a. 系统所输出的商品单价不是顾客所想要的(例如,顾客产生抱怨并需要更低的价格): 1. 出纳员输入替换的价格。 2. 系统打印新价格。5a. 系统检测到和外部税金计算系统之间的通信失败: 1. 系统重启该POS结点上的服务,并继续执行。1a. 系统检测到服务并没有重启。1. 系统发出一个出错信号。2. 出纳员可以手动计算并输入税金,或者取消此次销售。5b. 顾客说他们符合打折条件(例如顾客是商店的职工): 1. 出纳员发出打折请求。 2. 出纳员输入顾客的身份标识码。 3. 系统根据打折规则计算出折扣总数额。5c. 顾客说用他们账上的存款为此次销售付账: 1. 出纳员发出取款请求。 2. 出纳员输入顾客的身份标识码。 3. 系统在顾客的账上扣钱。6a. 顾客说他们想付钱但没有带足够的现金: 1a. 顾客使用其他付账方法。 1b. 顾客告诉出纳员取消此次销售,出纳员在系统上取消销售。7a. 用现金付账: 1. 出纳员输入顾客所付的总款数。 2. 系统计算出应找的余款,并弹出现金抽屉。 3. 出纳员存放现金并找零给顾客。 4. 系统记录此次现金支付情况。7b. 用信用卡付账: 1. 顾客输入他们的信用卡账户信息。 2. 系统向外部支付授权服务系统发出支付授权请求,并请求支付批准。 2a. 系统检测到和外部系统之间协作上的失败: 1. 系统给出纳员发出一个出错信号。 2. 出纳员请顾客用其他方式付款。 3. 系统收到批准支付回应并向出纳员发出一个批准支付信号。 3a. 系统收到拒绝支付信号:1. 系统发拒绝支付信号给出纳员。 2. 出纳员请顾客用其他方式付款。 4. 系统记录信用卡支付情况,其中包括批准支付情况。 5. 系统给出信用卡支付签名输入机制。 6. 出纳员请客户进行信用卡支付签名,客户输入签名。7c. 用账单付款7d. 赊账7e. 顾客拿出优惠券: 1. 在处理付款之前,出纳员记录每张优惠券,系统合适降低商品的价格。系统为了记账而记

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论