前端开发入门到精通的在线学习网站

网站首页 > 资源文章 正文

Visual Paradigm 教程[UML]:如何绘制封装图?(上)

qiguaw 2024-10-19 07:57:11 资源文章 16 ℃ 0 评论

在项目开始时,您只有有限数量的图表,一切都简单而美观。然而,当时间过得匆匆时,已经创建了越来越多的图表,并且它们开始变得无法管理。因此,当您想要查看或进行更改时,您的项目将难以导航并且难以找到图表。

我们如何解决这个问题?我们可以使用Package Diagram将您的图表组织到不同的包中。这有助于您根据图表的性质对图表进行分类,使其更易于导航和定位。Package Diagram还可以作为目录跳转到您想要查看的图表。在本教程中,我们将向您展示如何完成此操作。

为您的图表创建包

首先,我们需要准备好我们的包。要创建包:

1、要创建Package Diagram,请从工具栏中选择Diagram> New

2、在New Diagram窗口中,选择Package Diagram并单击Next

3、输入Racing Game Packages作为图表名称,然后单击OK确认。

4、单击图工具栏中的“包”按钮,然后单击图的空白区域以创建包。

5、将包命名为Race。

6、重复这些步骤以分别创建其他包,即Tuning,Security和General。

使用Packages组织图表

一旦包准备好,我们就可以开始组织我们的图表了。

1、单击Race包以显示子图资源图标。

2、单击资源图标,然后从弹出菜单中选择Existing Diagrams ....

在Add Sub Diagrams对话框中选择以下图表,然后按OK提交。

  1. [Class Diagram] Race Tracks
  2. [Class Diagram] Race Type
  3. [Class Diagram] Racing Game
  4. [Sequence Diagram] Register to race
  5. [Communication Diagram] Register to race - Communications
  6. [State Machine Diagram] Race Series State
  7. [Activity Diagram] Register to race
  8. [Entity Relationship Diagram] Player Race
  9. [Entity Relationship Diagram] Race Series
  10. [Entity Relationship Diagram] Racing Game

4、重复以下包和图表的步骤

  1. 包图Tuning[Class Diagram] Tuning
  2. [State Machine Diagram] Car State
  3. [Entity Relationship Diagram] CarsSecurity[Sequence Diagram] Game Service Login
  4. [Sequence Diagram] Purchase Add-ons (fail)
  5. [Sequence Diagram] Purchase Add-ons (success)
  6. [Sequence Diagram] Racing Game Login
  7. [Business Process Diagram] Purchase Add-onsGeneral[Use Case Diagram] Racing Game Use Cases
  8. [Component Diagram] Game Components
  9. [Deployment Diagram] Game Deployment
  10. [Requirement Diagram] General Requirements
  11. [Matrix Diagram] Classes Matrix
  12. [Matrix Diagram] Entity Matrix
  13. [Matrix Diagram] Process Matrix
  14. [Analysis Diagram] Player Analysis Diagram

定义包之间的关系

现在,由于我们的图表是使用包构建的,因此我们可以定义它们之间的关系。要在包之间创建关系:

1、单击Race包以显示其资源图标。

2、拖出资源目录按钮并将其放在安全包中。

3、在资源目录中选择依赖关系 ->包。

4、重复这些步骤以创建从Tuning到Security以及从Security到General的依赖关系。

点击“了解更多”下载产品最新试用版

↓↓↓

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表