Sec-I A - Introduction To UML
Sec-I A - Introduction To UML
Login() Open()
Logout() Close()
Move()
Structural things: Interface
Notation:
Isensor
Notation: Process
Order
Structural things: active class
Active class:
An active class is a class whose objects own one or
more processes or threads and therefore can
intimate control activity.
When an active object is created, the associated flow of
control is started. When the active object is destroyed,
the associated flow of control is terminated.
Graphically, an active class is rendered just like a
class, but with heavy lines, usually including its
names, attributes, and operations.
Event Manager
Suspend()
Flush()
Structural things: Component
Component:
A component is a physical and replaceable part of a
system that conforms to and provides the
realization of a set of interfaces.
Notation: DML_Parser.C
PrintServer
Notation:
Behavioral things
Behavioral things are the dynamic parts of UML
models. It represents the behavior of the
system.
(1) An Interaction
(2) A state machine
Behavioral things: Interaction
An Interaction:
Is a behavior that comprises a set of messages
exchanged among a set of objects within a
particular context to accomplish a specific
purpose.
Waiting
Behavioral things: State machine
A state machine involves a number of other
elements, including
States
Transitions( the flow from state to state)
Events(things that trigger a transition)
Activities(the response to a transition)
Grouping things: Package
Grouping things are the organizational part of UML
models.
Package is a general purpose mechanism for
organizing elements into groups. Structural
things, behavioral things may be placed in a
package.
Accounts
Department
Annotation things: Note
Annotational things are the explanatory parts of
UML.
Comments can be applied to describe any element
in a model
Remark about any element in a model
There is one primary kind of annotational thing,
called a note. A note is simply a symbol for
rendering constraints and comments for an
element.
Graphically, a note is rendered as a
Parses user-query and builds rectangle with a dog-eared corner
expression stack (or invokes with comment.
ErrorHandler)
Relationships in UML
There are 4 kinds of relationships
(1) Dependency
(2) Association
(3) Generalization
(4) Realization
Relationships: Dependency
Dependency:
a semantic relationship where a change in one thing (the
independent thing) causes a change in the semantics of
the other thing (the dependent thing).
Notation:
(arrow-head points to the independent thing)
Relationships: association
association:
a structural relationship that describes the connection
between two things.
1..*
Notation:
Employer Employee
Notation:
(arrow-head points to the superclass)
Relationships: Realization
a semantic relationship between two things wherein one
specifies the behaviour to be carried out, and the other
carries out the behaviour.
Notation:
(arrow-head points to the thing being realized)
diagrams in UML
The graphical presentation of the model. Represented as a
connected graph - vertices (things) connected by arcs
(relationships).
Implementation
Design view view
Use case
view
Process
view Deployment
view
Systems architecture
Architecture of system(software)
The use case view of a system encompasses the use
cases that describe the behavior of the system. the
static aspect of this view is captured in use case
diagram and dynamic view is captured in
interaction, statechart and activity diagram.
Elaboration:
It is the second phase of the process, when the
product vision and its architecture are defined.
In this phase, the systems requirements are defined
and arranged by certain criteria.
Software Development Life Cycle
Construction:
it is the third phase of the process, when the
software is actually constructed and being ready for
transitioning to user community. Here also the
systems requirements and evaluation criteria are
constantly reexamined against business needs.
Transition:
It is the fourth phase of the process, when the software
is turned into the hands of user community. Even
during this period, the system is continuously
improved, bugs are rectified and features that were
not there in earlier release are added
Common mechanisms in UML
4 common mechanism that apply consistently through
out the language.
Specifications
Adornments
Common divisions
Extensibility mechanisms
Common mechanisms in UML
Specifications:
UML is more than graphical language. Behind every
part of its graphical notation there is a specification
that provides a textual statement of the syntax and
semantics of the building block.
For ex.
Behind a class icon is a specification that provides the
full set of attributes, operations and behaviors that
class renders.
Common mechanisms in UML
Adornments:
Most elements in the UML have a unique and direct graphical
notation that provides a visual representation of the most
important aspects of the element.
Ex. The class notation exposes the most important aspects of
a class, namely its name, attributes and operations. It can
include other details like, visibility of its attributes and
operations Transaction
+ public
# protected
- private +execute()
+rollback()
#priority()
-timestamp()
Common mechanisms in UML
Common divisions:
In modeling object-oriented systems, the world often
gets divided in at least a couple of ways.
First, there is a division of class and object
customer
Jan:Customer
Name
Address
phone :Customer
Elyse
Common mechanisms in UML
Common divisions:
Second, there is a separation of interface and
implementation.
spellingwizard.dll
IUnkown
ISpelling
Stereotypes
Tagged values
constraints
Common mechanisms in UML
Stereotypes:
A stereotype extends the vocabulary of the UML,
allowing you to create new kinds of building blocks
that are derived from existing ones but that are
specific to your problem.
Ex. If you are working in a programming language, such as java or
C++, you will often want to model exceptions.
EventQueue
{Version=3.2
Author=abc}
Exception
overflow -------------------
Add()
Remove()
Flush()
Common mechanisms in UML
Tagged value:
It allows you to create new information in the
specification of element.
Ex.
If a product(software) has many releases over time,
you often want to track the version and author of
that version. EventQueue
{Version=3.2
Author=abc}
Add()
Remove()
Flush()
Common mechanisms in UML
Constraints:
A constraint extends the semantics of a UML building
block, allowing you to add new rules or modify
existing ones. For ex. you might want to constrain
the EventQueue class so that additions are done in
order.
EventQueue
{Version=3.2
Author=abc}
Exception
overflow -------------------
Add()--------------------{ordered}
Remove()
Flush()