You are on page 1of 32

Chapter Three

Abebaw
c
Degu

An Overview
Chapter Three
of UML
What is UML?
An overview of UML
Conceptual Model of
the UML
Building Blocks of
the UML
Things Abebaw
c Degu
Relationships
Diagrams

Debre Berhan University


College of Computing
Department of Software Engineering
Object Oriented System Analysis and Design (SEng3082)

November 14, 2018

1 / 32
Outline

Chapter Three

Abebaw
c
Degu

An Overview
of UML
What is UML? 1 An Overview of UML
Conceptual Model of
the UML What is UML?
Building Blocks of
the UML Conceptual Model of the UML
Things
Relationships Building Blocks of the UML
Diagrams
Things
Relationships
Diagrams

2 / 32
An Overview of UML

Chapter Three
What is UML?
Abebaw
c
Degu
Is a language. It is not simply a notation for drawing
An Overview diagrams, but a complete language for capturing
of UML
What is UML? knowledge (semantics) about a subject and expressing
Conceptual Model of
the UML knowledge (syntax) regarding the subject for the purpose
Building Blocks of
the UML of communication.
Things
Relationships
Diagrams
Applies to modeling and systems. Modeling involves a
focus on understanding a subject (system) and capturing
and being able to communicate in this knowledge.
It is the result of unifying the information systems and
technology industry’s best engineering practices
(principals, techniques, methods and tools).
used for both database and software modeling

3 / 32
An Overview of UML

Chapter Three

Abebaw
c Overview of the UML
Degu
The UML is a language for:
An Overview
of UML
visualizing
What is UML? specifying
Conceptual Model of
the UML constructing
Building Blocks of
the UML documenting
Things
Relationships
Diagrams
Visual modeling (visualizing)
A picture is worth a thousand words!
Uses standard graphical notations
Semi-formal
Captures Business Process from enterprise information
systems to distributed Web-based applications and even to
hard real time embedded systems

4 / 32
An Overview of UML

Chapter Three Specifying


Abebaw
c
Degu building models that are: Precise, Unambiguous, Complete
An Overview
UML symbols are based on well-defined syntax and
of UML
What is UML?
semantics.
Conceptual Model of
the UML UML addresses the specification of all important analysis,
Building Blocks of
the UML design, and implementation decisions.
Things
Relationships
Diagrams
Constructing
Models are related to OO programming languages.
Round-trip engineering requires tool and human
intervention to avoid information loss
Forward engineering — direct mapping of a UML model
into code.
Reverse engineering — reconstruction of a UML model
from an implementation.
5 / 32
An Overview of UML

Chapter Three

Abebaw
c
Degu Documenting
An Overview Architecture, Requirements, Tests, Activities (Project
of UML
What is UML?
planning, Release management)
Conceptual Model of
the UML
Building Blocks of
Conceptual Model of the UML
the UML
Things
Relationships
To understand the UML, you need to form a conceptual
Diagrams
model of the language, and this requires learning three
major elements.
Elements:
Basic building blocks
Rules
Common Mechanisms

6 / 32
An Overview of UML

Chapter Three

Abebaw
c
Degu
Building Blocks of the UML
The vocabulary of the UML encompasses three kinds of
An Overview
of UML building blocks:
What is UML?
Conceptual Model of Things
the UML
Building Blocks of
Relationships
the UML
Things
Diagrams
Relationships
Diagrams
Things in the UML
There are four kinds of things in the UML:
Structural — nouns of UML models
Behavioral — dynamic (verbal) parts of UML models.
Grouping — organizational parts of UML models.
Annotational — explanatory parts of UML models.

7 / 32
An Overview of UML

Chapter Three Structural Things


Abebaw
c
Degu These are the Nouns and Static parts of the model.
An Overview
These are representing conceptual or physical elements.
of UML There are seven kinds of structural things:
What is UML?
Conceptual Model of Class
the UML
Building Blocks of Interface
the UML
Things Collaboration
Relationships
Diagrams
Use Case
Active Class
Component
Node
1. Class
Is a description of set of objects that share the same
attributes, operations methods, relationships and
semantics.
8 / 32
An Overview of UML

Chapter Three

Abebaw
c
Degu

An Overview
of UML
What is UML?
Conceptual Model of
the UML
Building Blocks of
the UML
Things 2.Interface
Relationships
Diagrams
A collection of operations that specify a service (for a
resource or an action) of a class or component.
It describes the externally visible behavior of that element

9 / 32
An Overview of UML

Chapter Three 3.Collaboration


Abebaw
c
Degu Define an interaction among two or more classes.
An Overview
Define a society of roles and other elements.
of UML
What is UML?
Provide cooperative behavior.
Conceptual Model of
the UML Capture structural and behavioral dimensions.
Building Blocks of
the UML
Things
UML uses pattern as a synonym (careful)
Relationships
Diagrams

4.Use Case
A sequence of actions that produce an observable result
for a specific actor.
A set of scenarios tied together by a common user goal.
10 / 32
An Overview of UML

Chapter Three 4. Use Case cont...


Abebaw
c
Degu Provides a structure for behavioral things.
Realized through a collaboration (usually realized by a set
An Overview
of UML of actors and the system to be built).
What is UML?
Conceptual Model of
the UML
Building Blocks of
the UML
Things
Relationships
Diagrams
5. Active Class
Special class whose objects own one or more processes or
threads
Can initiate control activity.

11 / 32
An Overview of UML

Chapter Three 6. Component


Abebaw
c
Degu Replaceable part of a system.
Components can be packaged logically.
An Overview
of UML Conforms to a set of interfaces.
What is UML?
Conceptual Model of Provides the realization of an interface.
the UML
Building Blocks of
the UML
Represents a physical module of code
Things
Relationships
Diagrams

7. Node
Element that exists at run time.
Represents a computational resource.
Generally has memory and processing power.
12 / 32
An Overview of UML

Chapter Three

Abebaw
c
Degu

An Overview
of UML
What is UML?
Conceptual Model of
2.Behavioral Things
the UML
Building Blocks of
the UML
These are Verbs of UML models.
Things
Relationships
These are Dynamic parts of UML models: behavior over
Diagrams
time and space
Usually connected to structural things in UML.
There are two kinds of Behavioral Things:
Interaction:
Is a behavior of a set of objects comprising of a set of
messages exchanges within a particular context to
accomplish a specific purpose.

13 / 32
An Overview of UML

Chapter Three
State Machine:
Abebaw
c Is a behavior that specifies the sequences of states an
Degu
object or an interaction goes through during its lifetime in
An Overview response to events, together with its responses to those
of UML
What is UML?
events.
Conceptual Model of
the UML
Building Blocks of
the UML
Things
3.Grouping Things
Relationships
Diagrams
These are the organizational parts of the UML models.
There is only one primary kind of group thing:
Packages:
General purpose mechanism for organizing elements into
groups.
Purely conceptual; only exists at development time.
Contains behavioral and structural things.
Can be nested.
Variations of packages are: Frameworks, models, and
subsystems. 14 / 32
An Overview of UML

Chapter Three

Abebaw
c
Degu

An Overview
of UML 4.Annotational Things
What is UML?
Conceptual Model of
the UML
These are Explanatory parts of UML models
Building Blocks of
the UML
These are the Comments regarding other UML elements
Things
Relationships
(usually called adornments in UML)
Diagrams
There is only one primary kind of annotational thing:
Note:
A note is simply a symbol for rendering constraints and
comments attached to an element or collection of elements
Is a best expressed in informal or formal text.

15 / 32
An Overview of UML

Chapter Three Relationships


Abebaw
c There are four kinds of relationships:
Degu
Dependency
An Overview Association
of UML
What is UML?
Generalization
Conceptual Model of
the UML
Realization
Building Blocks of
the UML These relationships tie things together.
Things
Relationships
It is a semantic connection among elements.
Diagrams
These relationships are the basic relational building blocks
of the UML.
1. Dependency:
Is a semantic relationship between two things in which a
change to one thing (the independent thing) may affect
the semantics of the other thing (the dependent thing).

16 / 32
An Overview of UML

Chapter Three 2. Association:


Abebaw
c
Degu
Is a structural relationship that describes a set of links, a
link being a connection among objects.
An Overview
of UML
What is UML?
Conceptual Model of
the UML
Building Blocks of
the UML Aggregation
Things
Relationships
Is a special kind of association.
Diagrams
It represents a structural relationship between the whole
and its parts.
Represented by black diamond.

17 / 32
An Overview of UML

Chapter Three 3.Generalization


Abebaw
c
Degu
Is a specialization/generalization relationship in which
objects of the specialized element (the child) are more
An Overview
of UML specific than the objects of the generalized element.
What is UML?
Conceptual Model of
the UML
Building Blocks of
the UML
Things
Relationships 4. Realization
Diagrams
a semantic relationship between two elements, wherein one
element guarantees to carry out what is expected by the
other element.

Where?
Between interfaces and classes or
Between use cases and the collaborations 18 / 32
An Overview of UML

Chapter Three
Diagrams
Abebaw
c
Degu A diagram is the graphical presentation of a set of
An Overview
elements.
of UML
What is UML?
Represented by a connected graph: Vertices are things;
Conceptual Model of
the UML Arcs are behaviors.
Building Blocks of
the UML UML includes nine diagrams:
Things
Relationships
Class Diagram
Diagrams
Object Diagram
Use case Diagram
Sequence Diagram
Collaboration Diagram
State chart Diagram
Activity Diagram
Component Diagram
Deployment Diagram
19 / 32
An Overview of UML

Chapter Three
Static Modeling
Abebaw
c
Degu
Class Diagram
An Overview
of UML Object Diagram
What is UML?
Conceptual Model of Component Diagram
the UML
Building Blocks of
the UML Deployment Diagram
Things
Relationships
Diagrams
Dynamic Modeling
Use case Diagram
Sequence Diagram
Collaboration Diagram
State chart Diagram
Activity Diagram

20 / 32
An Overview of UML

Chapter Three 1.Class Diagram


Abebaw
c
Degu
Class Diagrams describe the static structure of a system,
or how it is structured rather than how it behaves.
An Overview
of UML A class diagram shows the existence of classes and their
What is UML?
Conceptual Model of
relationships in the logical view of a system
the UML
Building Blocks of
These diagrams contain the following elements.
the UML
Things
Classes and their structure and behavior
Relationships Association, aggregation, dependency, and inheritance
Diagrams
relationships
Multiplicity and navigation indicators
Role names
Uses:
to model the static design view of a system.
To model the vocabulary of a system.
To model the simple collaborations.
To model a logical data base schema
21 / 32
An Overview of UML

Chapter Three 2. Object Diagrams


Abebaw
c
Degu Shows a set of objects and their relationships.
A static snapshot of instances.
An Overview
of UML Object Diagrams describe the static structure of a system
What is UML?
Conceptual Model of
the UML
at a particular time. Whereas a class model describes all
Building Blocks of
the UML
possible situations, an object model describes a particular
Things
Relationships
situation.
Diagrams Object diagrams contain the following elements:
Objects which represent particular entities.
These are instances of classes.
Links which represent particular relationships between
objects.
These are instances of associations.
Uses:
Object diagrams are used to model object structures.
22 / 32
An Overview of UML

Chapter Three 3.Use case diagrams


Abebaw
c
Degu Use Case Diagrams describe the functionality of a system
and users of the system.
An Overview
of UML These diagrams contain the following elements:
What is UML?
Actors: which represent users of a system, including
Conceptual Model of
the UML human users and other systems.
Building Blocks of
the UML Use Cases: which represent functionality or services
Things
Relationships provided by a system to users.
Diagrams
Uses to model the context and requirements of a system.
4. Sequence Diagrams
Sequence Diagrams describe interactions among classes.
These interactions are modeled as exchanges of messages.
These diagrams focus on classes and the messages they
exchange to accomplish Some desired behavior
Sequence diagrams are a type of interaction diagrams.
23 / 32
An Overview of UML

Chapter Three
Sequence diagrams contain the following elements:
Abebaw
c
Degu
Class roles: which represent roles that objects may play
within the interaction.
An Overview Lifelines: which represent the existence of an object over a
of UML
What is UML? period of time.
Conceptual Model of
the UML Activations: which represent the time during which an
Building Blocks of
the UML
object is performing an operation.
Things
Relationships
Messages: which represent communication between
Diagrams objects.
5. Collaboration Diagram
Collaboration Diagrams describe interactions among
classes and associations.
These interactions are modeled as exchanges of messages
between classes Through their associations.
Collaboration diagrams are a type of interaction Diagram.
24 / 32
An Overview of UML

Chapter Three
Collaboration diagrams contain the following elements.
Abebaw
c Cass roles: which represent roles that objects may play
Degu
within the interaction.
An Overview Association roles: which represent roles that links may play
of UML
What is UML?
within the interaction.
Conceptual Model of
the UML
Message flows: which represent messages sent between
Building Blocks of
the UML
objects via links. Links transport or implement the delivery
Things of the message.
Relationships
Diagrams 6. State chart Diagrams
State chart (or state) diagrams describe the states and
responses of a class.
Uses To model reactive objects and to describe the
behavior of a single class of objects.
State chart Diagrams describe the behavior of a class in
response to external stimuli.
These diagrams contain the following elements:
25 / 32
An Overview of UML

Chapter Three
States: which represent the situations during the life of an
Abebaw
c
Degu object in which it satisfies some condition, performs some
activity, or waits for some occurrence.
An Overview
of UML Transitions: which represent relationships between the
What is UML?
Conceptual Model of different states of an object.
the UML
Building Blocks of
the UML 7. Activity Diagrams
Things
Relationships
Diagrams
Activity diagrams describe the activities of a class.
These diagrams are similar to State chart diagrams and
use similar conventions, but activity diagrams describe the
behavior of a class in response to internal processing
rather than external events as in State chart diagram.
Swim lanes: which represent responsibilities of one or more
objects for actions within an overall activity; that is, they
divide the activity states into groups and assign these
groups to object that must perform the activities.
26 / 32
An Overview of UML

Chapter Three
Action States: which represent atomic, or non
Abebaw
c
Degu
interruptible, actions of entities or steps in the execution
of an algorithm.
An Overview
of UML Action flows: which represent relationships between the
What is UML?
Conceptual Model of
different action states of an entity.
the UML
Building Blocks of
Object flows: which represent the utilization of objects by
the UML
Things action states and the influence of action states on objects.
Relationships
Diagrams
Used to model a work flow and operation
8. Component Diagram
Component diagrams describe the organizations and
dependencies among software Implementation
components.
These diagrams contain components, which represent
Distributable physical units, including source code, object
code, and executable code.
These are static implementation view of a system. 27 / 32
An Overview of UML

Chapter Three
Component: is a physical and replaceable part of a system
Abebaw
c that conforms to and provides the realization of a set of
Degu
interfaces.
An Overview is rendered as a rectangle with tabs.
of UML
What is UML?
It is also useful for constructing executable systems
Conceptual Model of
the UML
through forward and reverse engineering.
Building Blocks of
the UML
Component diagram contains
Things
Relationships
Components
Diagrams Interfaces
Dependency, generalization, association, and realization
relationships.
Uses
to model the static implementation view of a system.
To model source code
To model executable releases
To model physical databases
To model adaptable systems
28 / 32
An Overview of UML

Chapter Three 9. Deployment Diagrams


Abebaw
c
Degu
Deployment diagrams describe the configuration of
run-time processing resource elements and the mapping of
An Overview
of UML software implementation components onto them.
What is UML?
Conceptual Model of
These Diagrams contain components and nodes, which
the UML
Building Blocks of
represent processing or computational resources, including
the UML
Things computers, printers, etc.
Relationships
Diagrams
Deployment diagrams are essentially class diagrams that
focus on a system’s nodes.
Deployment diagram contains:
Nodes
Dependency and association relationships
Uses:
To model embedded systems.
To model client/ server systems.
To model fully distributed systems. 29 / 32
An Overview of UML

Chapter Three
N.B
Abebaw
c
Degu An interaction diagram that emphasizes the time ordering
of messages called Sequence diagram.
An Overview
of UML
What is UML?
An interaction diagram that emphasizes the structural
Conceptual Model of
the UML
organization of the objects that send and receive messages
Building Blocks of
the UML
called collaboration diagram.
Things
Relationships
A sequence diagram has two dimensions.
Diagrams
Horizontal Axis: represents different objects.
Vertical Axis: it shows the sequence of messages
Sequence diagram has two features that differentiate them
from collaboration diagram.
Object Lifeline: The lifeline represents the existence of the
object at a particular time. An object lifeline is the vertical
dashed line that represents the existence of an object over
a period of time.
30 / 32
An Overview of UML

Chapter Three

Abebaw
c Focus of control: The focus of control is a tall, thin
Degu
rectangle that shows the period of time during which an
An Overview object is performing an action.
of UML
What is UML?
Conceptual Model of Uses:
the UML
Building Blocks of
the UML To model the flows of control by time ordering.
Things
Relationships
Diagrams NOTE:
Collaboration diagram has two features that distinguish it
from sequence diagram.
Path: How one object is linked to another object.
Sequence Number: It indicates the time order of messages.
Uses:
To model the flows of control by organization.

31 / 32
Chapter Three

Abebaw
c
Degu

An Overview
of UML
What is UML?
Conceptual Model of
the UML
Building Blocks of
the UML
Things
Relationships
Thank You!!!
Diagrams

32 / 32

You might also like