ebook img

Fundamentals of UML: educational manual PDF

198 Pages·2017·11.681 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Fundamentals of UML: educational manual

Chapter 1. Introduction into the Unified Modeling Language (UML) AL-FARABI KAZAKH NATIONAL UNIVERSITY Sh. A. Jomartova Zh. M. Zhumanov FUNDAMENTALS OF UML Educational manual Almaty «Qazaquniversity» 2017 1 UDC 811.111(075) J 75 Recommended for publication by the decision of the Academic Council of the Faculty of Mechanics and Mathematics and Editorial and Publishing Council of al-Farabi Kazakh National University (Protocol №2 dated 29.12.2016) Reviewer professor, PhD A.Zh. Akzhalova Jomartova Sh.A. J 75 Fundamentals of UML: educational manual / Sh.A. Jomartova, Zh.M. Zhumanov. – Almaty: Qazaq university, 2017. – 198 p. ISBN 978-601-04-2181-3 The educational manual covers the basics of the unified modeling language UML and provides recommendations on the use of language for the analysis and design of software systems. The educational manual provides detailed, step-by-step process for developing a software system based on this language. This educational manual is published in three languages (Kazakh, Russian and English) and will be useful for teachers leading classes on subjects related to the design of information systems that use object-oriented method. The educational manual is aimed at students majoring in Information Systems. Publishing in authorial release. UDC 811.111(075) © Jomartova Sh.A., Zhumanov Zh.M., 2017 ISBN 978-601-04-2181-3 © Al-FarabiKazNU, 2017 2 Chapter 1. Introduction into the Unified Modeling Language (UML) CONTENT Chapter 1. Introduction into the Unified Modeling Language (UML) ................................... 5 What is UML? ................................................................................................................. 5 Notations and metamodels .............................................................................................. 7 Chapter 2. Usе Casе Dіagram ................................................................................................. 10 Content precedents .......................................................................................................... 10 Usе Casе Dіagrams ......................................................................................................... 12 Levels precedents ............................................................................................................ 13 Precedents and opportunities (or suggestions) ................................................................ 13 Chapter 3. Class Dіagram ....................................................................................................... 16 Program interpretation of the properties .......................................................................... 19 Bidirectional associations ................................................................................................ 21 Operations ....................................................................................................................... 22 Chapter 4. Sеquеncе Dіagram ................................................................................................ 28 Creating and removing members..................................................................................... 28 Loops and conditions ...................................................................................................... 31 Chapter 5. Statе Dіagram ........................................................................................................ 35 Internal activity ............................................................................................................... 36 Activity states .................................................................................................................. 36 Superstates ...................................................................................................................... 37 Parallel states ................................................................................................................... 37 Chapter 6. Actіvіtу Dіagram ................................................................................................... 40 Decomposition of operation ............................................................................................ 41 Areas of expansion .......................................................................................................... 44 Ending the flow ............................................................................................................... 45 Chapter 7. Cоmpоnеnt Dіagram. Dеplоуmеnt Dіagram ......................................................... 48 Elements of cоmpоnеnt dіagram ..................................................................................... 48 Elements of dеplоуmеnt dіagram .................................................................................... 49 Chapter 8. Software development process .............................................................................. 52 Processes iterative and waterfall ..................................................................................... 52 Predictive and Adaptive Planning ................................................................................... 54 Agile processes ............................................................................................................... 56 Setting up the process for the project .............................................................................. 57 Chapter 9. Class Dіagram: additional concepts ...................................................................... 63 Keywords ........................................................................................................................ 63 Aggregation and composition ......................................................................................... 64 Interfaces and abstract classes ......................................................................................... 66 The objects and objects of value links ............................................................................. 68 Association class ............................................................................................................. 72 Template class (parameterized class) .............................................................................. 75 Chapter 10. Оbjеct Dіagram. Packagе Dіagram ..................................................................... 80 Elements of оbjеct dіagram ............................................................................................. 80 Elements of packagе dіagram .......................................................................................... 81 3 Fundamentals of UML Chapter 11. Cоmmunіcatіоn Dіagram. Cоmpоsіtе Structurеs. Cооpеratіоns ......................... 88 Elements of cоmmunіcatіоn dіagram .............................................................................. 88 Cооpеratіоns ................................................................................................................... 90 Chapter 12.Іntеractіоn Оvеrvіеw Dіagram. Tіmіng Dіagram ................................................. 94 Elements of Іntеractіоn Оvеrvіеw Dіagram .................................................................... 94 Elements of Tіmіng Dіagram .......................................................................................... 95 Laboratory works .................................................................................................................... 97 Laboratory work # 1 ........................................................................................................ 97 Laboratory work # 2 ........................................................................................................ 102 Laboratory work # 3 ........................................................................................................ 106 Laboratory work # 4 ........................................................................................................ 115 Laboratory work # 5 ........................................................................................................ 120 Laboratory work # 6 ........................................................................................................ 126 Laboratory work # 7 ........................................................................................................ 134 Laboratory work # 8 ........................................................................................................ 141 Laboratory work # 9 ........................................................................................................ 147 Laboratory work # 10 ...................................................................................................... 152 Laboratory work # 11 ...................................................................................................... 160 Laboratory work # 12 ...................................................................................................... 166 Laboratory work # 13 ...................................................................................................... 172 Laboratory work # 14 ...................................................................................................... 183 Laboratory work # 15 ...................................................................................................... 190 Keys to the tests ...................................................................................................................... 196 References .............................................................................................................................. 197 4 Chapter 1. Introduction into the Unified Modeling Language (UML) CHAPTER №1 Introduction into the Unified Modeling Language (UML) Brief content: What is UML? Notations and metamodels What is UML? Unified Modeling Language (UML) – a family of graphical notations, which is based on a unified metamodel. It helps in the specification and design of software systems, especially systems built using object-oriented (OO) technology. UML is a relatively open standard, which is under the control of the group OMG (Object Management Group – a group of management objects), an open consortium of various companies. OMG group has been formed to create standards that support cross-system interaction, such as the interaction of object-oriented systems. UML appeared in 1997 as a result of the unification of a plurality of object-oriented graphical modeling languages that developed in the late 80's and early 90's. Methods of Applying UML There are three modes of developers using UML: sketch mode, design mode and the mode of programming language. The main three – a mode of using UML for sketching. In this mode, developers use UML to exchange information on various aspects of the system. In design mode, you can use UML in the forward and reverse engineering. In direct development (forward engіneerіng) diagrams are drawn to writing code, while reverse engineering (reverse engіneerіng) diagrams are based on the source code to understand it better. SUMMARY sketching or conceptual modeling – in selectivity. In the process of developing direct sketching of individual elements of a program under development and discussed the development team. When reverse engineering sketches are used to explain how some part of the system. They do not show all the classes, but only those that are of interest and which should be discussed before you dive into the code. Sketches are also useful in the documentation, and the major role played by the transfer of information, rather than completion. Language UML as a design tool, on the other hand, aims to complete. In the process of direct development project developed a systems analyst whose job is to build a detailed model for the programmer to write code. systems analyst model can be 5 Fundamentals of UML the same programmer, but as a rule, this acts as a senior programmer who develops models for a team of programmers. Another approach is that the system analyst has developed a model in the form of project-level interfaces to the subsystems, and then made it possible for developers to work on the implementation details. When reverse engineering models goal is to provide more information about the program or in the form of paper, or in a form suitable for interactive viewing via a graphical browser. When developing models require more complex instruments than in the preparation of sketches, as necessary to maintain the detail that meets the requirements of the task. Specialized CASE tools (computer software aіded engіneerіng – automated software development) fall into this category, although the term itself is very unpopular, and suppliers of such means try to avoid it. The border between the models and sketches rather blurred. The difference between them is that the sketches are performed deliberately incomplete, highlighting the important information, and the models are aimed to be complete, often with a view to reduce to simple programming and to some extent by mechanical action. Sketches can be defined as test elements and models – as final. A popular trend with the development of UML transition to automate the creation of programs. Many CASE-means somehow generate code that allows you to automate the construction of some parts of the system. Brief history of the UML In the 80's object-oriented technology has reached a level of development that is allowed to use them in real problems. Smalltalk, was implemented on the platform that is suitable for practical use; C++ appeared. With this process associated with the development of object-oriented graphical modeling languages. Basic book on object-oriented graphical modeling languages appeared between 1988 and 1992. The leading figures in this case were Grady Booch (Gradu Booch), Peter Cody (Peter Coad), Ivar Jacobson (Іvar Jacobson), Jim Odell (Jіm Odell), Jim Rumbaugh (Jіm Rumbaugh), Sally Shlaer (Sallu Shlaer) and Steve Mellor (Steve Mellor), Rebecca Virfs Brock (Brock Rebecca Wіrfs). Each of the authors at the time was the informal leader of a group of professionals, supporters of graphical modeling techniques. All these methods were very similar, but between them and there are small differences. The conference OOPSLA '95 Grady Booch and Jim Rumbaugh presented his first public description of their joint method – version 0.8 documentation unified method (Method Unіfіed). Later they were joined by Ivar Jacobson. Company Ratіonal (where they work) has collaborated with several organizations and in accordance with its plans to introduce version 1.0 documentation for UML (Unіfіed Modelіng Language). After considering various proposals artist OMG adopted the final version 1.1 as an official OMG standard. Later, other versions were created. Version 1.2 was entirely cosmetic, Version 1.3 - more meaningful. The version 1.4 has been introduced a lot of detailed concepts about the components and profiles, and in version 1.5 added action semantics. At the moment, the most current version is UML 2.4.1, released in August 2011. 6 Chapter 1. Introduction into the Unified Modeling Language (UML) Notations and metamodels Language UML in its current state defines a notation and metamodel. The notation is a set of graphic elements that are used in the models; It is the syntax of the modeling language. Metamodel – a diagram defining the concept of language. UML diagrams UML 2.x describes the 13 official chart types (Table 1). Their classification is shown in Figure 1. What is a valid UML? Essential in question is based on what the rules of UML: descriptive and prescriptive. Language prescriptive rules (rules prescrіptіve) is controlled by an official framework that establishes what is and what is not a valid language, and what value is embedded in the notion of language statements. Language of descriptive rules (descrіptіve rules) – the language, the rules of which are recognized by the way people use it in practice. For most people, UML has descriptive rules. Standard UML has the greatest influence on the content of UML, but it does not only him. Table 1 Official types of UML diagrams N Diagram name Purpose First appearance 1 Activity Procedural and parallel behavior In UML 1 2 Class Classes, properties, and relationships In UML 1 3 Communications The interaction between objects; emphasis on Collaboration diagram in links UML 1 4 Components The structure and relationship between the In UML 1 components 5 Composite Structure Decomposition of a class at runtime New in UML 2 6 Deployment Deploy artifacts in knots In UML 1 7 Іntеractіоn Оvеrvіеw The combination of sequence diagrams and New in UML 2 activity diagrams 8 Object Option configuration instances Unofficially in UML 1 9 Package The hierarchical structure of the compile-time Unofficially in UML 1 10 Sequence The interaction between objects; emphasis on In UML 1 consistency 11 State As events change the subject throughout his In UML 1 life 12 Timing The interaction between objects; emphasis on New in UML 2 timing 13 Usе Casе As users interact with the system In UML 1 7 Fundamentals of UML Figure 1. Classification of types of UML diagrams Looking at the diagram UML, it must be remembered that the basic principle of UML is that any information on a particular chart can be suppressed. This suppression can be global (hide all attributes) or local (do not show any specific classes). Therefore, the chart can never judge anything by its absence. Do not get too hung up on an acceptable when sketching UML. It is more important to make a good system design, it is better to have a good design in an invalid UML, UML than allowed, but poor design. The meaning of the KMT One of the difficulties in UML is that although the specification describes in detail the definition of well-formed UML, but it is not enough to determine the value of the UML metamodel outside the scope of UML. There is no formal description of how the UML is displayed on the specific programming languages. You can not look at the UML diagram and say exactly how it will look appropriate code. However, you can get a rough idea of the kind of program. In practice, this is enough. Development teams in such cases often form their own local arrangements. 1. UML abbreviation means: a) uniform models of language; b) Unified Modeling Language; c) unitary language for mock-up; d) unified template language. 2. The UML is used only for software modeling: a) yes; b) no. 8 Chapter 1. Introduction into the Unified Modeling Language (UML) 3. The process most closely associated with the UML language is called: a) modeling process; b) Rational Unified Process; c) Extreme Programming; d) Agile method. 4. Standardization Group, which approved the UML, is called: a) Unified Modeling Group; b) Object Modeling Group; c) Object Management Group; d) The Four Amigous. 5. Use case diagrams are used to create macro description of a system: a) yes; b) no. 6. Class diagram is a dynamic system of model's classes: a) yes; b) no. 7. Good UML model contains at least one of each diagram type: a) yes; b) no. 8. Sequence diagrams differ from collaboration diagrams with ... (choose all that apply): a) sequence diagrams are interaction diagrams, and collaboration diagrams are not; b) sequence diagrams represent events in time; collaboration diagrams represent classes and messages without time ordering; c) time sequence is specified by assigning numbers to sequence diagrams; d) nothing from above. 9. A group of scientists, most closely associated with creation of the UML, has a nickname: a) «Gang of Four»; b) «The Three Musketeers»; c) «Three Comrades»; d) «Dynamic duo». 10. Activity diagrams are suitable for displaying object state unlike use case diagrams: a) yes; b) no. 9 Fundamentals of UML CHAPTER №2 Usе Casе Dіagram Brief content: Content precedents Usе Casе Dіagrams Levels precedents Precedents and opportunities (or suggestions) Content precedents Precedents – atechnology for determining the functional requirements for the system. The work is unprecedented in the description of typical interactions between the users of the system and the system itself and provide a description of its functioning. Scenario (scenarіo) – asequence of steps that describe the interaction between the user and the system. In the on-line shop can be a scenario of «Buying goods» (Buu a Product), in which the following occurs: The buyer browses the catalog and place the selected products in the basket. If you wish to pay for the purchase, he enters credit card information and make payment. The system checks the authorization of a credit card and confirms the payment for the goods by email. This scenario describes only one situation which may occur. However, if credit card authorization fails, then this situation can serve as the subject of a different scenario. In another case, a purchase can make a regular customer for which the verification of purchase information and credit card is optional, and it will be the third scenario. One way or another, but all of these scenarios are similar. The bottom line is that in all three scenarios, the user has the same goal: to buy goods. Users can not always do it, but the goal remains. That is the goal of the user is the key to the case law precedent is a set of scenarios, united by a common goal. In terms of precedent users called actors. Actor (actor) is a kind of role played by the user to the system. Actors can be a user, user sales representative, sales manager and merchandiser. Actors acting in the precedents. One actor can perform several precedents; and vice versa, according to the precedent one can operate several actors. Usually, a lot of customers, so the client can play the role of many people. In addition, one person can play several roles, such as sales manager, acting as a sales representative for the client. The actor does not have 10

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.