状态图Statechart Diagram 总结

状态图(Statechart Diagram)是叙述一个实体线根据事件反映的信息个人行为,表明了该实体线怎样按照现阶段所在的状态对不一样的事件作出反映。通常大家建立一个UML状态图是为了更好地下列的分析目地:科学研究类、人物角色、分系统、或部件的繁杂个人行为。

状态图用以表明状态机(它特定对象所属的状态编码序列)、使对象做到这种状态的事件和标准、及其做到这种状态时需产生的实际操作。

状态图(Statechart Diagram)主要运用于叙述一个对象在其存活过程中的信息个人行为,主要表现为一个对象所历经的状态编码序列,造成状态转移的事件(Event),及其因状态转移而随着的姿势(Action)。一般可以用状态机对一个对象的生命期模型,状态图用以表明状态机(State Mac hine Diagram),关键在与叙述状态图的控制流。如下图事例,状态机叙述了门对象的存活过程中的状态编码序列,造成转移的事件,及其因状态转移而随着的姿势(Action).

A state diagram is a type of diagram used in computer science and related fields to describe the behavior of systems. State diagrams require that the system described is composed of a finite number of states; sometimes, this is indeed the case, while at other times this is a reasonable abstraction. Many forms of state diagrams exist, which differ slightly and have different se ** ntics.The name of the diagram itself clarifies the purpose of the diagram and other details. It describes different states of a component in a system. The states are specific to a component/object of a system.A Statechart diagram describes a state ** chine. State ** chine can be defined as a ** chine which defines different states of an object and these states are controlled by external or internal events.Activity diagram explained in the next chapter, is a special kind of a Statechart diagram. As Statechart diagram defines the states, it is used to model the lifetime of an object.Purpose of Statechart DiagramsStatechart diagram is one of the five UML diagrams used to model the dynamic nature of a system. They define different states of an object during its lifetime and these states are changed by events. Statechart diagrams are useful to model the reactive systems. Reactive systems can be defined as a system that responds to external or internal events.Statechart diagram describes the flow of control from one state to another state. States are defined as a condition in which an object exists and it changes when some event is triggered. The most important purpose of Statechart diagram is to model lifetime of an object from creation to termination.Statechart diagrams are also used for forward and reverse engineering of a system. However, the ** in purpose is to model the reactive system.Following are the ** in purposes of using Statechart diagrams −(1)To model the dynamic aspect of a system.(2)To model the life time of a reactive system.(3)To describe different states of an object during its life time.(4)Define a state ** chine to model the states of an object.

分类搜索:

UML - Statechart Diagrams状态图_百科

扫码免费用

源码支持二开

申请免费使用

在线咨询