活动图 状态图软件工程_活动图| 软件工程

活动图 状态图软件工程

活动图 (The Activity Diagram)

The Activity diagram in the software design models is used to represent the flow of control among the different activities of the software. In the activity diagram, we represent different actions through activities. These activities take some input from some other activity of the system or through the input and output units and produce some signal outputs that control the workflow of the other activities.

软件设计模型中的活动图用于表示软件不同活动之间的控制流。 在活动图中 ,我们通过活动表示不同的动作。 这些活动从系统的其他活动或通过输入和输出单元获取一些输入,并产生一些信号输出,这些信号输出控制其他活动的工作流程。

The activities in the activity diagram can be defined as states. Each of these states performs some internal action that is responsible for performing the required task. Apart from this, each activity also performs some external activity. This external activity can either be responsible for triggering or handling some other activities or can be used for directly producing the required output. Each activity can produce one or more external transitions. If there is direct workflow form one activity to another activity without any specific conditional case, then the activity produces only one external transition. If more than one external transition is produced by the activity, then these transitions are handled through the conditional statements (like if-else).

活动图的活动可以定义为状态。 这些状态中的每一个都执行一些内部操作,这些内部操作负责执行所需的任务。 除此之外,每个活动还执行一些外部活动。 该外部活动可以负责触发或处理其他活动,也可以用于直接产生所需的输出。 每种活动都可以产生一个或多个外部过渡。 如果存在从一个活动到另一个活动的直接工作流而没有任何特定条件的情况,则该活动仅产生一个外部转换。 如果活动产生了多个外部转换,那么这些转换将通过条件语句(如if-else)进行处理。

软件模型活动图的特征 (Characteristics of the activity diagram of the software model)

  • The control flow in every software has to start from some starting point and end at some termination point. In the activity diagram, the starting point is represented through a filled circle and the termination point through a filled circle with a double boundary. Every activity diagram must contain these symbols.

    每个软件中的控制流程必须从某个起点开始,并在某个终点结束。 在活动图中,起点用实心圆表示,终点用实心圆(带有双边界)表示。 每个活动图都必须包含这些符号。
  • The activity diagram can also be divided into different categories using the swim lanes. Each lane represents a single category and all the activities belonging to this category are represented in this lane.

    使用泳道也可以将活动图分为不同类别。 每个通道代表一个类别,并且属于该类别的所有活动都在该通道中代表。
  • The conditional statements can be represented in the activity diagram by placing a diamond symbol from the line representing the external transition and then splitting this line according to desired conditions. The condition that each of these divisions follows can be mentioned on top or beside the line.

    通过在表示外部转换的行中放置菱形符号,然后根据所需条件分割该行,可以在活动图中表示条件语句。 这些划分中每个划分所遵循的条件可以在行的顶部或旁边提及。
  • The diamond symbol is also used for conjugating the external transitions from various activities. Most of the time, this type of situation occurs when the activity model proceeds towards the termination stage.

    菱形符号还用于缀合各种活动的外部过渡。 大多数情况下,当活动模型进入终止阶段时,会发生这种情况。

活动模型的特征 (Features of the Activity model)

  • This model is prepared in the early stages of software development, i.e. in the analysis and design phase.

    该模型是在软件开发的早期阶段即分析和设计阶段准备的。
  • Internal control flow can be well represented through this model.

    通过此模型可以很好地表示内部控制流程。
  • Complex processing activities that involve many elements and components can easily be represented understandably through this model.

    通过此模型可以轻松地理解涉及许多元素和组件的复杂处理活动。
活动图 状态图软件工程_活动图| 软件工程

翻译自: https://www.includehelp.com/basics/the-activity-diagram-software-engineering.aspx

活动图 状态图软件工程