UML View (iv) state diagram

Source: Internet
Author: User

The following is a Library management system state diagram, very typical, covering the use of all the elements of the state diagram, because the state diagram is relatively simple, directly from the view of the picture can be very well mastered. Suppose you want to understand the concept of the element rigor of the state diagram, which is carefully described below the diagram.

Look at the above state diagram, I believe that the state diagram has a relatively macro grasp, the next theoretical knowledge, you will feel very little content, this feeling is very natural, because the content is really few. Always remember the important idea of UML, such as the definition of UML "Unified Modeling Language", the "unification".

The state diagram shows a state machine, which is usually used to describe the behavior of a single object, and is mainly used to describe the state change of the narrative object to determine what behavior changes the state of the object and the effect of the object state change on the system. It is generally used to describe the state transitions throughout the life cycle of an entity class object to gain an understanding of the entity and to obtain the relationship between the system and the entity object.

Suppose you want to describe the interaction between the narrative objects, preferably using a time series diagram or collaboration diagram, the effect will be more pleasing to you.

constituent elements of a state diagram :

    • Initial state

The initial state is the starting position of the state machine, which does not require an event to be triggered.

    • State

A state is a condition in which an object runs an activity or waits for an event.

    • Composite state

A composite state is a state that has a child state (or a nested state). Its sub-state can be a partial complete process that contains an initial state and a terminating state.

    • Transfer

A transition is a relationship between two states that represents an object in the first state that runs some action and enters a second log when a specified event occurs and the specified condition is met. In general, the transfer is always driven by an event, but sometimes the transfer is not required, and no event transfer is called a " total transfer ", which represents a state of " The default occurs . For example, when the book is in a loan state, it can be transferred to the " non-lending " state by default.

    • Event

An event is a specific action or behavior, and sometimes includes a timer such as a system clock, which, assuming the condition is not sufficient, triggers a transfer.

    • Finally state

Finally the state indicates the end of the state machine run, or the end of the object life cycle.

The following is the use of computer room charge system status diagram, Welcome to enlighten!

computer room charge system is I finished a system recently, in learning UML , because of the computer room charge system business is more familiar with, so always need to use it to practice practiced hand.

Analysis: Select the "upper Machine card" as a state machine description of the object ("on the Machine card" is to describe the business and deliberately abstracted out, in reality, may not be at all, just need to remember their account and corresponding password will be able to).

References: "Thinking in UML"

UML View (iv) state diagram

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.