Sholpan Jomartova

Fundamentals of UML. Educational manual


Скачать книгу

(hіstoru pseudostate). This means that when the clocks are included, optional radio / CD goes into a state in which there were times when they were off. Arrow emerging from history, showing what state existed initially, when there was no prehistory.

       When used state diagrams

      State diagrams are good for describing the behavior of a single object in several precedents. But they are not very suitable for describing the behavior characterized by the interaction of multiple objects. So it makes sense, together with diagrams of the use other technologies. For instance, interaction diagrams perfectly describe the behavior of several objects in a single precedent, and activity diagrams are good for showing the basic sequence of several objects in a few precedents.

      Figure 17. Parallel states

      Developing state diagrams, do not try to draw them to each class of system. This approach is often used for the purpose of formally rigorous completeness, but are almost always a waste of effort. State diagrams is better to apply only for those classes that exhibit interesting behavior when building a state diagram helps to understand how it happens. Many experts believe that the editor UІ and control objects have functionality useful in mapping using state diagrams.

      1. State diagrams (finite state machine diagrams) are intended for:

      a) showing different systems;

      b) showing objects and their messages in a precedent;

      c) understanding the functioning of a precedent;

      d) describing behavior of an object in course of his involvement in several precedents.

      2. Finite state machines are especially useful for showing graphical user interface and real-time devices:

      a) yes;

      b) no.

      3. A nodal point is used to:

      a) merge several incoming transitions in one outbound;

      b) split one incoming transition into multiple outgoing;

      c) a and b;

      d) none of the responses is suitable.

      4. History state used to restore previous states:

      a) yes;

      b) no.

      5. Uninterrupted operation is performed:

      a) during some time, and interrupted operation is performed instantly and can be interrupted;

      b) instantly, and interrupted operation is performed during some time and can be interrupted;

      c) during some time, can be interrupted, interrupted operation is also performed during some time;

      d) similar to interrupted operation during some time; but only interrupted operation can be interrupted.

      6. Transitions are shown with directed segments and have additional options:

      a) triggering event (optional), guard condition and activity;

      b) triggering event, guard condition (optional) and activity;

      c) triggering event, guard condition and activity (optional);

      d) triggering event, guard condition and activity, use of each of them is and optional and up to developer.

      7. Internal transitions lead to execution of entry and exit operations:

      a) yes;

      b) no.

      8. State self transitions lead to execution of entry and exit operations:

      a) yes;

      s) no.

      9. Composite orthogonal state:

      a) is divided into regions, and only one region can be active at the same moment of time;

      b) is divided into regions, and only one substate can be active at the same moment of time;

      c) is divided into regions, and only one substate can be active in each region at the same time;

      d) consists of one region, and several substates can be active simultaneously.

      10. Composite non-orthogonal state:

      a) consists of several regions, and only one region can be active at the same moment of time;

      b) is not divided into regions, and only one substate can be active at the same moment of time;

      c) is not divided into regions, and several substates can be active at the same moment of time;

      d) is divided into regions, and only one substate in each region can be active at the same moment of time.

      CHAPTER № 6

      Actіvіtу Dіagram

      Brief content:

      Decomposition of operation

      Sections, signals

      Areas of expansion

      Ending the flow

      Activity diagrams – atechnology that allows to describe the logic of procedures, business processes and workflows. In many cases, they resemble the block diagram, but a fundamental difference between the activity diagram and flowchart notation is that the first support parallel processes.

      Figure 18 shows an example of a simple activity diagrams. The action starts with the initial node (іnіtіal node), and then perform operations Receіve Order (Accept order). Then there is a branching (fork), which has one input stream and multiple output parallel streams.

      The figure 18 shows that the operation Fіll Order (Fill in the application form) Send Іnvoіce (Send bill) and the following are performed in parallel. Essentially, in this case, it means that the sequence of operations does not matter.

      Activity diagram allows anyone who carries out this process, choose the course of action. In other words, the chart only establishes rules for a mandatory sequence of actions that must be followed. It is important for the modeling of business processes, as these processes are often carried out in parallel. Such diagrams are also useful in the development of parallel algorithms, in which independent threads can do the work in parallel.

      In the presence of parallelism requires synchronization. The order does not close until it is paid for and not delivered. This is shown by combining (joіn) Close Order before surgery (close order). Coming from the combined stream is performed only when all the incoming streams reached association.

      Nodes in the graph of activity called operations (actіons) and not active (actіvіtіes). Strictly speaking, the activity refers to a sequence of actions, so the diagram represents the activities consisting of the operations.

      Conditional behavior is schematically indicated by means of decisions (decіsіons) and M (merges). The decision has one incoming flow and several protected output. Each output stream has protection – conditionalexpressions, enclosed in square brackets. Every time when the solutions selected only one of the output streams, however protection should be mutually exclusive. Application [else] as a defense means that the flow [else] is used when other decisions are made to protect this false value.

      Figure 18 is a decision after the operation of filling the application. If there is a rush order, it is carried out during the day (Overnіght Delіveru); otherwise there will be a common service (Regular Delіveru).

      Merge (merge) has several input flows and one output. The merger represents the completion of the conditional behavior, which was launched solution.

      In UML 2 operation is performed only if all the threads are passed. Therefore it is recommended to apply the operation with a single input and a single output stream, and clearly show all associations and mergers; This eliminates the confusion.