403 Seminar UNIFIEDITECMODELLING LANGUAGE UML ITEC 403 SEMINAR

  • Slides: 40
Download presentation
403 Seminar UNIFIEDITECMODELLING LANGUAGE (UML) ITEC 403 SEMINAR

403 Seminar UNIFIEDITECMODELLING LANGUAGE (UML) ITEC 403 SEMINAR

Objectives • Explain the concept of Unified Process (UP) • Describe Unified Modeling Language

Objectives • Explain the concept of Unified Process (UP) • Describe Unified Modeling Language (UML) • Explain the types of UML Diagrams • Use-Case Diagram • Class Diagram • Activity Diagram • Sequence Diagram 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 2

What is Unified Process? Unified Process (UP) is an example of a system development

What is Unified Process? Unified Process (UP) is an example of a system development methodology, based on object-oriented design. It consists of multiple iterations. Each iteration has a problem-solving approach of defining the requirements, analyzing and designing the solution, implementing and finally testing the system components. Unified Process life cycle is taken in 4 phases; Inception, Elaboration, Construction and Transition. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 3

UP Life cycle 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 4

UP Life cycle 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 4

What is Unified Process? • Anytime people need to record or communicate information, in

What is Unified Process? • Anytime people need to record or communicate information, in any context, it is very useful to create a model. • A model is a representation of the solution of a problem taken into consideration during the system development period. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 5

What are UML diagrams? UML, which stands for Unified Modeling Language, is a way

What are UML diagrams? UML, which stands for Unified Modeling Language, is a way to visually represent the architecture, design, and implementation of complex software systems. When you’re writing code, there are thousands of lines in an application, and it’s difficult to keep track of the relationships and hierarchies within a software system. UML diagrams divide that software system into components and subcomponents. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 6

Why should you use UML diagrams? UML is a standardized modeling language that can

Why should you use UML diagrams? UML is a standardized modeling language that can be used across different programming languages and development processes, so the majority of software developers will understand it and be able to apply it to their work. Though many engineers dread diagrams, they’re useful in an Agile development environment: they keep development productive and focused. Instead of thinking them as just a “nice to have, ” treat your UML diagrams as core aspects of documentation. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 7

Benefits: q. Bring new team members or developers switching teams up to speed quickly.

Benefits: q. Bring new team members or developers switching teams up to speed quickly. q. Navigate source code. q. Plan out new features before any programming takes place. q. Communicate with technical and non-technical audiences more easily. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 8

UML Diagrams There a number of different UML diagrams that provides a look of

UML Diagrams There a number of different UML diagrams that provides a look of the system from different perspectives, here are the models required for the ITEC 403 progress report: ◦Use Case diagram (General and Partial) ◦Domain Model Class diagrams ◦Activity diagrams ◦Sequence Diagrams 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 9

What is UML? To gain the greatest benefit from UML, it must be used

What is UML? To gain the greatest benefit from UML, it must be used at the beginning of the process when requirements are being collected, reviewed and evaluated. Traditionally, this has been a relatively informal activity involving discussion within technical committees. UML can provide the formalization and visualization which make the requirements clear and unambiguous. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 10

USE CASE DIAGRAM Use case diagrams model how users, displayed as stick figures called

USE CASE DIAGRAM Use case diagrams model how users, displayed as stick figures called “actors, ” interact with the system. This type of UML diagram should be a high-level overview of the relationships between actors and systems, so it can be a great tool for explaining your system to a non-technical audience. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 11

When to apply use case diagrams gram A use case diagram doesn't go into

When to apply use case diagrams gram A use case diagram doesn't go into a lot of details —for example, don't expect it to model the order in which steps are performed. Instead, a proper use case diagram depicts a high-level overview of the relationship between use cases, actors, and systems. Experts recommend that use case diagrams be used to supplement a more descriptive textual use case. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 12

UML Use Case diagrams are ideal for: • Representing the goals of system-user interactions

UML Use Case diagrams are ideal for: • Representing the goals of system-user interactions • Defining and organizing functional requirements in a system • Specifying the context and requirements of a system • Modeling the basic flow of events in a use case 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 13

Use Case Diagram Notations Actors are the users of a system. When one system

Use Case Diagram Notations Actors are the users of a system. When one system is the actor of another system, label the actor system with the actor stereotype. Use Case Draw use cases using ovals. Label the ovals with verbs that represent the system's functions. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 14

Use Case Diagram Notations(continue. . ) Association Relationships Illustrate relationships between an actor and

Use Case Diagram Notations(continue. . ) Association Relationships Illustrate relationships between an actor and a use case with a simple line (Association). For relationships among use cases, use arrows labeled either “include" or "extend. " An “include" relationship indicates that one use case is needed by another in order to perform a task. An "extends" relationship indicates alternative options under a certain use case. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 15

Use Case Diagram Notations(continue. . ) System Draw your system's boundaries using a rectangle

Use Case Diagram Notations(continue. . ) System Draw your system's boundaries using a rectangle that contains use cases. Place actors outside the system's boundaries. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 16

Use Case Diagram Notations(continue. . ) Generalization is used when you find two or

Use Case Diagram Notations(continue. . ) Generalization is used when you find two or more use cases that have commonalities in behavior, structure, and purpose. When this happens, you can describe the shared parts in a new, often abstract, use case, that is then specialized by child use cases. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 17

Use case diagram(continue. . . ) For the progress report you are required to

Use case diagram(continue. . . ) For the progress report you are required to draw the usecase diagram from 2 perspectives; general and partial. The general use-case diagram, will display all the system functions and all the actors with the relationship lines as in fig. 1. and fig. 2. The partial use-case diagrams are designed for each actor separately, showing each actor’s role in the system by including the relative functions with the relationship lines as in fig. 2. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 18

Figure 1 – General Use Case diagram Example Fig. 1 19. 1. 2022 DESIGNED

Figure 1 – General Use Case diagram Example Fig. 1 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 19

Figure 2 – General Use Case diagram Example Fig. 2 19. 1. 2022 DESIGNED

Figure 2 – General Use Case diagram Example Fig. 2 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 20

Figure 3 – Partial Use Case diagram Example Fig. 3. 19. 1. 2022 DESIGNED

Figure 3 – Partial Use Case diagram Example Fig. 3. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 21

Class Diagram Class diagrams are one of the most useful types of diagrams in

Class Diagram Class diagrams are one of the most useful types of diagrams in UML as they clearly map out the structure of a particular system by modeling its classes, attributes, operations, and relationships between objects. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 22

The standard class diagram is composed of three sections: Upper section: Contains the name

The standard class diagram is composed of three sections: Upper section: Contains the name of the class. This section is always required, whether you are talking about the classifier or an object. Middle section: Contains the attributes of the class. Use this section to describe the qualities of the class. This is only required when describing a specific instance of a class. Bottom section: Includes class operations (methods). Displayed in list format, each operation takes up its own line. The operations describe how a class interacts with data. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 23

Member access modifiers(visibility) All classes have different access levels depending on the access modifier

Member access modifiers(visibility) All classes have different access levels depending on the access modifier (visibility). Here are the access levels with their corresponding symbols: q. Public (+) q. Private (-) q. Protected (#) q. Package (~) 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 24

Association Fig. 3 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 25

Association Fig. 3 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 25

Association (continue…) In the example above(fig. 3), the Car class and Road. Trip class

Association (continue…) In the example above(fig. 3), the Car class and Road. Trip class are interrelated. At one end of the line, the Car takes on the association of "assigned. Car" with the multiplicity value of 0. . 1, so when the instance of Road. Trip exists, it can either have one instance of Car associated with it or no Cars associated with it. In this case, a separate Car class with a multiplicity value of 0. . * is needed to demonstrate that a Road. Trip could have multiple instances of Cars associated with it. Since one Car instance could have multiple "get. Road. Trip" associations— in other words, one car could go on multiple road trips— the multiplicity value is set to 0. . * 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 26

Inheritance Fig. 4 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 27

Inheritance Fig. 4 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 27

Inheritance(continue. . ) In this example(fig. 4), the object "Car" would inherit all of

Inheritance(continue. . ) In this example(fig. 4), the object "Car" would inherit all of the attributes (speed, numbers of passengers, fuel) and methods (go(), stop(), change. Direction()) of the parent class ("Vehicle") in addition to the specific attributes (model type, number of doors, auto maker) and methods of its own class (Radio(), windshield. Wiper(), ac/heat()). Inheritance is shown in a class diagram by using a solid line with a closed, hollow arrow. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 28

Aggregation In this type of relationship, a more complex object is created by the

Aggregation In this type of relationship, a more complex object is created by the assembling of different objects together. The interaction within the different groups of objects is defined by Aggregation. The integrity of the objects are protected, and the response of the assembled objects are decided by the control object. In aggregation, the classes nurture the ‘has a’ relationship. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 29

Aggregation (continue…) Whole part relationship, Aggregation implies a relationship where the child can exist

Aggregation (continue…) Whole part relationship, Aggregation implies a relationship where the child can exist independently of the parent. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 30

Composition It is a form of an aggregation which represents the whole part relationship.

Composition It is a form of an aggregation which represents the whole part relationship. Here, the part classifier lifetime is dependent on the whole classifier lifetime. In a class, a strong life-cycle is represented by the composition relationship. There is usually a one direction flow of data here. It is generally indicated by a solid line. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 31

Composition(continue. . . ) Composition implies a relationship where the child cannot exist independent

Composition(continue. . . ) Composition implies a relationship where the child cannot exist independent of the parent. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 32

Activity Diagram The Unified Modeling Language includes several subsets of diagrams, including structure diagrams,

Activity Diagram The Unified Modeling Language includes several subsets of diagrams, including structure diagrams, interaction diagrams, and behavior diagrams. Activity diagrams, along with use case and state machine diagrams, are considered behavioral diagrams because they describe what must happen in the system being modeled. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 33

Activity Diagram(continue. . ) Activity diagrams present a number of benefits to users. Consider

Activity Diagram(continue. . ) Activity diagrams present a number of benefits to users. Consider creating an activity diagram to: §Demonstrate the logic of an algorithm. §Describe the steps performed in a UML use case. §Illustrate a business process or workflow between users and the system. §Simplify and improve any process by clarifying complicated use cases. §Model software architecture elements, such as method, function, and operation. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 34

Symbol Description Initial node Final Node Decision Node Activcity Symbol(Action state) Join Node Fork

Symbol Description Initial node Final Node Decision Node Activcity Symbol(Action state) Join Node Fork Node Merge 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 35

Activity Diagrams For the progress report we require an activity diagram for each use-case

Activity Diagrams For the progress report we require an activity diagram for each use-case (function) in the system, in order to understand the workflow better. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 36

Sequence Diagram Sequence diagrams are a popular dynamic modeling solution in UML because they

Sequence Diagram Sequence diagrams are a popular dynamic modeling solution in UML because they specifically focus on lifelines, or the processes and objects that live simultaneously, and the messages exchanged between them to perform a function before the lifeline ends. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 37

Sequence Diagram Notations Lifeline A lifeline represents an individual participant in the Interaction. Actor

Sequence Diagram Notations Lifeline A lifeline represents an individual participant in the Interaction. Actor An Actor a type of role played by an entity that interacts with the subject (e. g. , by exchanging signals and data). An actor can also be external to the subject (i. e. , in the sense that an instance of an actor is not a part of the instance of its corresponding subject). They typically represent roles played by human users, external hardware, or other subjects 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 38

Sequence Diagram Notations (continue. . ) Call Message A call message defines a particular

Sequence Diagram Notations (continue. . ) Call Message A call message defines a particular communication between lifelines of an interaction, which represents an invocation of operation of target lifeline. Return Message A return message defines a particular communication between lifelines of an interaction, which represents the pass of information back to the caller of a corresponded former message. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 39

Sequence Diagram For the progress report we require an Sequence diagram for each use-case

Sequence Diagram For the progress report we require an Sequence diagram for each use-case (function) in the system, in order to understand the workflow better. 19. 1. 2022 DESIGNED BY HALIDE SARIÇIZMELI 40