Title: UML
1Lecture 5
- UML Tag parser
- A model is simplification of reality
- Grady Booch
2UML Things
Nouns
Explanatory
Structural things
Behavioral things
Grouping things
Annotational things
Verbs
Organizational
Logical
Physical
3Structural logical things
Class
Description of a set of objects that share the
same attributes operations, relationships and
semantics. A class implements one or more
interfaces.
public - private
Class is used in class diagrams, which are handy
during modeling phase
4Structural logical things
Interface
Collection of operations that specify a service
of class or component. An interface describes
externally visible behavior of an element. An
interface may represent complete behavior of a
class or component or only part of it. Interfaces
defines a set of operation specifications (signatu
res) but never a set of operation implementations.
In addition to class diagrams Interfaces are used
in Component diagrams which are used for
physical modeling of dependencies between
components.
5Structural logical things
Collaboration
Defines an interaction that captures some
cooperative behavior. Any class can participate
in many collaborations. Collaborations represent
the implementation of patterns that make up the
system. Essentially, think of collaborations as
Design Patterns.
Use case
Description of set of sequences of actions that a
system performs that yields an observable result
of value to a particular actor. Use case is used
to structure the behavioral things in a model. A
use case is realized by collaboration.
Active class
Class whose objects own one or more processes or
threads and, therefore can initiate control
activity. An active class is just like a class
except that its objects represent elements whose
behavior is concurrent with other elements.
6Structural physical things
Component
Is a physical and replaceable part of a system
that provides realization of a set of interfaces.
For example, Java Beans and ActiveX controls are
examples of such components. Components represent
physical packaging of logical elements such as
classes, interfaces and collaborations.
Node
Physical element that exists at run time and
represents computational resource, generally
having at least some memory and, often,
processing capability. A set of components
may reside on a node and can migrate from node to
node.
Node
7Behavioral things
Dynamic parts of UML models
Interaction
Behavior that comprises set of messages exchanged
among a set of objects within particular context
to accomplish specific purposes. Interaction
involves a number of elements such as messages,
action sequences.
State machine
Behavior that specifies the sequences of states
an object or interaction goes through during its
lifetime in response to events. The behavior
of individual class or classes maybe captured by
state machine. State machine consists of states,
transitions and events.
Reading token
8Grouping things
Organizational parts of UML models
Packages
General-purpose mechanism for organizing elements
into groups. Structural things, behavioral
things and grouping things maybe placed in the
package. Unlike components, packages are purely
conceptual.
9Annotational things
Explanatory parts of UML models
Note
Symbol for rendering constraints and comments
attached to an element. Just a note!
Contains some important information
10Relationships in UML
Dependency
Semantic relationship between two things in which
change in one thing may affect the semantics of
the other thing. Simply think of this as a
dependency between a class and parameter to one
of its methods
11Relationships in UML
Association
Structural relationship that describes a set of
links, connections between objects. Aggregation
is a special kind of association relationship it
is a relationship between a whole and its part.
May contain by reference or by value. Usually
contains by value when come to existence and go
away together.
12Relationships in UML
Generalization
Specialization/generalization relationship in
which objects of the specialized element (the
child) are substitutable for objects of
the generalized element (the parent). Child
shares structure and and interface with parent.
This is essentially an inheritance relationship.
13Relationships in UML
Realization
Semantic relationship between classifiers. One
classifier specifies the contract, the other
guarantees to carry it out. Realization
relationships can be encountered between
interfaces and classes or components or between
use cases and collaborations that realize them
14Attribute name
Tag name
Attribute value
ltENTITY NAMEentity1 TYPEPredatorgt ltPROPERTY
COLORBluegt ltPROPERTY GENEatgcgtttagt lt/ENTI
TYgt
Child tag
15(No Transcript)
16(No Transcript)
17Please visit
- UML center _at_ Rational corporation