Fundamentals of UML. Educational manual. Sholpan Jomartova

Чтение книги онлайн.

Читать онлайн книгу Fundamentals of UML. Educational manual - Sholpan Jomartova страница 11

Fundamentals of UML. Educational manual - Sholpan Jomartova

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

the activity of a DO is interrupted and the object returns to the Hardware Update Wіndow (Update window hardware).

      Figure 15. The state with activity

      AND DO activity and normal activities are a manifestation of a behavior. The crucial difference between them lies in the fact that the usual activity occur «instantaneously» and can not be interrupted by the usual events, whereas the DO activity can be performed for a limited time and can be interrupted, as shown in Figure 15. The instantaneity for different systems is treated differently; for real-time systems it may take a few machine instructions, and to desktop software could be several seconds.

      Superstates

      It often happens that several states have common transitions and internal activities. In such cases, they can be converted into a substate (substates), and general behavior in the transfer superstate (superstate), as shown in Figure 16. Without the superstate would have to draw the transition cancel (cancellation) for all three states within the state Enter Connectіon Detaіls (Entry details compounds).

      Figure 16. Superstate with nested substates

      Parallel states

      The states can be divided into several parallel states, launched at the same time. Fig. 17 shows a simple alarm clock, which may include a CD, or radio, and to show either the current time or alarm time.

      Options CD / radio and the current time / alarm time are parallel.

      Figure 20 also includes state history (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,

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