Lecture 2
Lecture 2
Modeling concept
Modeling concept
2
Collaboration
Use Cases
Active Classes
Components
Nodes
UML Structures: Class
24
UML class is a rectangle which contains the class
name the class attributes and operations.
Graphical Notation:
UML Structures: Interface
25
Represents the public or a collection of operations of a class or
component.
May not show the complete set of public operations
Is attached to the class or component that realises the interface
The term realizes is a mapping between the operations referred to
in the interface and the class or component where they are
actually implemented (see later).
Is represented by a circle and the interface name.
Graphical Notation:
UML Structures: Use Case
26
Represents a coherent unit of functionality to be supported by the
system.
Used to specify the intended behavior (the “what”) of a system
Describe externally visible functionality
Identify high-level services provided by the system
A description of a set of sequence of actions that a system
performs for a particular actor
An actor may be:
A human (hopefully!) user
An external software system
A Use Case is represented in UML as a title encapsulated in an
ellipse and an Actor is represented as a stick figure
Graphical Notation:
UML Structures: Collaboration
27
Defines the classes and other software components required
to implement a use case
A Realisation is the mapping between a Use Case and its
collaboration
Represented in UML as a title encapsulated in a dashed line
ellipse
Graphical Notation:
UML Structures: Active Class
28
A class whose objects own one or more processes or threads
and therefore can initiate control activity
Graphically an active class is rendered just like a class, but
with heavy lines.
Graphical Notation
UML Structures: Component
29
A component under UML has a similar meaning as a
software component: A replaceable part of the software
system that implements one or more interfaces.
Under UML a component is represented as a title
encapsulated by a rectangle with tabs.
Graphical Notation:
UML Structures: Node
30
An element that exists at run time and represents a
computational resource, generally having at least some
memory and, often processing capability
Represented in UML as 3D cube labeled with the device’s
name
Graphical Notation
Behavioral Things
31
Verbs of a model, representing behavior over time and
space
Generally connected to classes, collaboration and
objects.
Behavioral things are:
Interactions, and
State machines
Behavioral Things: Interaction
32
Set of messages exchanged among objects within a
context to accomplish a purpose
An interaction is composed of:
The set of messages
Action sequences (caused by invoking a message).
Two kinds:
Sequence diagrams, and
Collaboration diagrams
Addresses the dynamic view of a system
Using Rational Rose it is possible to generate one
from the other
Interaction Diagram: Sequence Diagram
48
Addresses time ordering of
messages: message centered
Time sequence is easier to
see in the sequence diagram,
read from top to bottom
Choose sequence diagram
when only the sequence of
operations needs to be
shown
Interaction Diagram: Collaboration Diagram
49
Addresses organization of
objects that send and receive:
object centered.
Time sequence is shown by
numbering the message label
of the links between objects
Choose collaboration
diagram when the objects
and their links facilitate
understanding the
interaction, and sequence of
time is not as important.
State Diagram
50
Show all the possible states
that objects of the class can
have and which events cause
them to change.
Show how the object’s state
changes as a result of events
that are handled by the
object.
Good to use when a class has
complex lifecycle behavior
Addresses event-ordered
behavior of objects
Activity Diagram
51
Show the sequential flow of
activities
A combination of activities
and event flows
Used to show the flow from
one activity to the next
Encourage discovery of
parallel processes which
helps eliminate unnecessary
sequences in business
processes
Addresses dynamic view of a
system
Component Diagram
52
Component diagrams illustrate
the organizations and
dependencies among software
components (the physical
world)
A component may be
A source code component
?
Thank you!!