Unified Modeling Language (UML) Diagrams IFS505 MATERIAL

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Unified Modeling Language

(UML) Diagrams
A.I. Makinde

1
Definition
• Unified Modeling Language (UML) is a
general-purpose modeling language. The main
aim of UML is to define a standard way
to visualize the way a system has been
designed. It is quite similar to blueprints used
in other fields of engineering. UML is not a
programming language, it is rather a visual
language.

2
Why do we need UML?
• Complex applications need collaboration and planning from
multiple teams and hence require a clear and concise way to
communicate amongst them.
• Businessmen do not understand code. So UML becomes
essential to communicate with non-programmers about
essential requirements, functionalities, and processes of the
system.
• A lot of time is saved down the line when teams can visualize
processes, user interactions, and the static structure of the
system.

3
Different Types of UML Diagrams

4
Structural vs Behavioural
• Structural Diagrams
- Structure diagrams emphasize on the things that must be
present in the system being modeled.
- Since structure diagrams represent the structure, they are
used extensively in documentation of architecture designs
• Behavioural Diagrams
- Behavior diagrams emphasize on what must happen in the
system being modeled.
- Since behavior diagrams illustrate the behavior of a system,
they are used extensively to describe the functionality of
software systems.

5
Use Case Diagram
- A use case diagram describes how a system interacts with outside actors.
- It is a graphical representation of the interaction among the elements and system.
- Each use case representation a piece of functionality that a system provides to its
user.
- Use case identifies the functionality of a system.
- Use case diagram allows for the specification of higher level user goals that the
system must carry out.
- These goals are not necessarily to tasks or actions, but can be more general
required functionality of the system.
- You can apply use case to capture the intended behavior of the system you are
developing, without having to specify how that behavior is implemented.
- A use case diagram at its simplest is a representation of a user's interaction with
the system and depicting the specifications of a use case.

6
A use case diagram contains four components.

i. The boundary, which defines the system of interest in relation to the


world around it.
ii. The actors, usually individuals involved with the system defined
according to their roles.
iii. The use cases, which the specific roles are played by the actors within
and around the system.
iv. The relationships between and among the actors and the use cases.

Purpose:
- The main purpose of the use case diagram is to capture the dynamic aspect of a
system.
- Use case diagram shows, what software is suppose to do from user point of view.
- It describes the behavior of system from user’s point.
- It provides functional description of system and its major processes.
- Use case diagram defines the scope of the system you are building.

7
When to Use: Use Cases Diagrams

- Use cases are used in almost every project.


- They are helpful in exposing requirements and planning
the project.
- During the initial stage of a project most use cases should
be defined.

8
Use case Notations

9
Use case Notations

10
Use case Notations

11
Class Diagram
The class diagram is a static diagram.
- A class model captures the static structure of a system by characterizing the
objects in the system, the relationship between the objects, and the attributes
and operations for each class of objects.
- The class diagram can be mapped directly with object oriented languages.
- The class model is the most important among the three models.
- Class diagram provide a graphical notation for modeling classes and their
relationship.
- They are concise, easy to understand, and work well in practice.
- Class diagrams are the backbone of almost every object-oriented method
including UML.
- They describe the static structure of a system.
When to use : Class Diagram
- Useful for Forward and Reverse engineering.
- Class diagrams are useful both for abstract modeling and for designing actual
programs.
- Developer uses class diagram for implementation decision.
- Business analysts can use class diagrams to model systems from the business
perspective.
12
Class Diagram Notations

13
Class Diagram Notations

14
Class Diagram Notations

15
Class Diagram Notations

16
Class Diagram Notations

17
Class Diagram Notations

18
Example

19
State Diagram
- A state diagram is a graph in which nodes correspond to states and directed arcs
correspond to transitions labeled with event names.
- A state diagram combines states and events in the form of a network to model all
possible object states during its life cycle, helping to visualize how an object
responds to different stimuli.
- A state diagram is a graph whose nodes are states and whose directed arcs are
transitions between states.
- A state diagram specifies the state sequence caused by event sequence.
- State names must be unique within the scope of a state diagram.
- All objects in a class execute the state diagram for that class, which models their
common behavior.
- We can implement state diagrams by direct interpretation or by converting the
semantics into equivalent programming code
When to use: State Diagram
- They are perfectly useful to model behavior in real time system.
- Each state represents a named condition during the life of an object during which
it satisfies some condition or waits for some event.
- It determines how objects of that class react to events.
- For each object state, it determines what actions the object will perform when it
receives an event. 20
State Diagram Notation

21
State Diagram Notation

22
State Diagram Notation

23
State Diagram Notation

24
State Diagram Notation

25
State Diagram Notation

26
State Diagram Notation

27

You might also like