Fundamentals of UML. Educational manual. Sholpan Jomartova
Чтение книги онлайн.

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

Название: Fundamentals of UML. Educational manual

Автор: Sholpan Jomartova

Издательство: КазНУ

Жанр: Техническая литература

Серия:

isbn: 978-601-04-2181-3

isbn:

СКАЧАТЬ that someone will do it to study and try to understand.

      1. Symbol of a precedent is:

      a) line;

      b) directed segment;

      c) human figure;

      d) oval containing text.

      2. An actor can only be a human:

      a) true;

      b) false.

      3. A symbol indicating dependency relationship:

      a) a line;

      b) a line with a triangle pointing to the dependent element;

      c) a dotted line with an arrow pointing to dependent element;

      d) a dotted line with an arrow pointing to element on which other elements depend.

      4. A stereotype of the attitude is shown:

      a) as text in angle quotes;

      b) as plain text near the line of relationship;

      c) as word <<stereotype>> inside an oval.

      5. <<Include>> stereotype is used to indicate reuse of functionality, modeled with another precedent:

      a) true;

      b) false.

      6. <<Extend>> stereotype is used to model additional system functions:

      a) true;

      b) false.

      7. Generalization in the UML is implemented as:

      a) polymorphism;

      b) aggregation;

      c) inheritance;

      d) interfaces.

      8. Each function of a system should be shown as a precedent:

      a) true;

      b) false.

      9. In <<extend>> stereotype extension arrow points to:

      a) a base use case;

      b) expansion use case.

      10. It is important to implement simple use cases first in order to ensure successful completion of initial stages:

      a) true;

      b) false.

      CHAPTER № 3

      Class Dіagram

      Brief content:

      Properties, attributes, multiplicity

      Program interpretation of the properties

      Bidirectional associations

      Operations

      The class diagram – themost common diagram UML. In addition to its extensive use of class diagrams concentrated to a large range of modeling concepts. Although their basic elements are used in virtually all the more complex elements are used less frequently.

      The class diagram describes the types of system objects, and various kinds of static relationships that exist between them. In class diagrams are displayed as properties of classes, class operations and restrictions are imposed on communication between objects. The UML term functionality (feature) is used as the primary term, and describes the properties and operations of the class.

      Figure 6 shows a typical class model describing the processing of customer orders. The boxes in the diagram represent classes and divided into three parts: class name (in bold), its attributes, and its operations. Figure 3 also shows the two types of relations between classes: associations and generalizations.

       Properties

      Properties represent structural functionality of the class. In the first approximation can be considered as the property class of the field.

      The properties represent a single concept embodies two very different entities: the attributes and associations. Although the diagram, they look quite different, in fact, one and the same.

       Attributes

      Attribute describes the property as a string of text within the rectangle class. The full form of the attribute:

      visibility name: type multiplicity = default value} {string properties

      For example:

      – name: Strіng [1] = "No name" {rеadОnlу}

      Be sure to name only.

      – Tag visibility indicates whether the attribute to the open (+) (publіc) or closed(-) (prіvate).

      – Attribute name – theway the class attribute references – approximately corresponds to the name of the field in a programming language.

      – The type attribute imposes a restriction on the kind of object that can be placed in the attribute. It can be considered an analogue type field in a programming language.

      – The default value is the value for the newly created objects if the attribute is not defined in the making.

      – The element {string} property allows you to specify additional properties of the attribute. In the example, it is equal to {} readOnlu, ie customers can not change the attribute. If it is omitted, as a rule, an attribute may be modified.

      Figure 3. Class Dіagram

       Association

      Some other kind of property – anassociation. Much of the information that can be specified in an attribute that appears in the association. Figures 4 and 5 show the same properties presented in different notations.

      Association – isa continuous line between the two classes, directed by the original class to the target class. Property name (with multiplicity) is located on the target end of the association. Trust the end of the association points to a class that is a type of property. Much of the information in both views is the same, but some components are different from each other. In particular, the association can show a multiplicity at both ends of the line.

      Usually, using attribute denote small items such as dates or logical values, and by means of association – more important classes, such as customers or orders.

      Figure 4. Presentation order properties as attributes

      Figure СКАЧАТЬ