Professional Documents
Culture Documents
CH 2
CH 2
CH 2
Overview of UML
Set by Tesfahun N.
Outline
An overview of UML.
Use Case Diagrams
Class Diagrams
Sequence diagrams
State chart diagrams
Activity diagrams
Component diagram
Deployment diagram
UML – Unified modeling language
visualizing,
Design
Structure diagrams:-
show the static structure of the system and its parts on different abstraction and
implementation levels and how they are related to each other.
Represented as =>
How to Find Actors
We can find the use case of the system by analyzing the
following pointes
What are the system tasks for each actor you have identified?
Generalization:
relationship between one general use case and a special use
case (used for defining special alternatives)
Represented by a line with a triangular arrow head toward the
parent use case.
Cont.
<<include>>
<<extend>>
Example: Library management
System
Use Case Diagrams(cont.)
Cont.
Pay Bill is a parent use case and Bill Insurance is the child
use case. (generalization)
Association has
Role names (e.g. enrolls)
University Person
0..1 *
employer teacher
Role
Multiplicity
Symbol Meaning Role
1 One and only one “A given university groups many people;
0..1 Zero or one some act as students, others as teachers. A
M..N From M to N (natural language) given student belongs to a single
university; a given teacher may or may not
* From zero to any positive integer
be working for the university at a
0..* From zero to any positive particular time.”
1..* integer From one to any positive
integer
OO Relationships: Composition
Whole Class Composition: expresses a relationship
Class W among instances of related classes.
Automobile
It may also be used to express a relationship
where instances of the Part-classes have
privileged access or visibility to certain
Engine Transmission attributes and/or behaviors defined by the
Whole-class.
OO Relationships: Aggregation
Container Class
Class C Aggregation: expresses a relationship among
instances of related classes.
AGGREGATION It is a specific kind of Container-Containee
relationship.
Class E1 Class E2 It expresses a relationship where an instance of the
Container-class has the responsibility to hold and
maintain instances of each Container-class
Example
Aggregation should be used to express a more
informal relationship than composition expresses.
Bag That is, it is an appropriate relationship where the
Container and its Containees
e.g. Each car has an engine that can not be shared with other cars.
Aggregations may form "part of" the aggregate, but may not be
essential to it.
Use the UML object symbol to illustrate class roles, but don't list object
attributes.
Message flow :
Example :-Sequence Diagram(Telephone call)
Sequence Diagrams – Object Life Spans
Creation
A
Create message
Object life starts at that point
Activation Create
B
Symbolized by rectangular
stripes
Place on the lifeline where
object is activated.
Deletion
Placing an ‘X’ on lifeline
Activation bar
X
Object’s life ends at that point Return
Deletion
Lifeline
Collaboration Diagram
Association
Conditions
Basic Activity Diagram Notations and Symbols
required.
Cont..
▪ Deployment Diagram
Component diagram