0% found this document useful (0 votes)
68 views29 pages

Uml PDF

The document discusses the history and goals of the Unified Modeling Language (UML). It describes UML as a general purpose visual modeling language that was created through the unification of existing modeling techniques and incorporates best practices in software engineering. The document outlines UML's structure, building blocks like classes and use cases, relationships between elements, and common mechanisms like specifications and adornments.

Uploaded by

patil yash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views29 pages

Uml PDF

The document discusses the history and goals of the Unified Modeling Language (UML). It describes UML as a general purpose visual modeling language that was created through the unification of existing modeling techniques and incorporates best practices in software engineering. The document outlines UML's structure, building blocks like classes and use cases, relationships between elements, and common mechanisms like specifications and adornments.

Uploaded by

patil yash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

1.

What is UML?
• Unified Modelling Language (UML) is a general purpose
visual modelling language
– Can support all existing lifecycles
– Intended to be supported by CASE tools
• Unifies past modelling techniques and experience
• Incorporates current best practice in software
engineering
• UML is not a methodology!
– UML is a visual language
– UP is a methodology

1
1.3

UML history
Prehistory Fusion UML
Schlaer st
1 unification Object
UML proposal
/ attempt Management UML 1.x UML 2.0
work begins accepted by
Mellor OMT, Booch, Group RFP
CRC
OMG
Booch
Rumba
ugh 1995
(OMT) Jacobs 1994 1996 1997 2003 2004
on
(Object Booch &
Jacobson UML
ory) Rumbaug Ongoing UML
Coad/ (Objector becomes
Yourdo h development
y) an
n (OMT)
joins industry
join
Rational standard
Rational

2
Goals of UML as stated by the designers are
-To model systems using OO concepts
-To establish an explicit coupling to conceptual
as well as executable artifacts
-To address the issues of scale inherent in
complex, mission-critical systems
-To create a modeling language usable by
humans and machine
To model systems using OO concepts
Specifying the structure and behavior of a
system
Visualizing a system as it is or as we want
it to be
Constructing a system from the template
provided by the model
Documenting the decisions made
State
State
Diagrams
Class
Use Case Diagrams
Diagrams
Use Case State
Use Case Diagrams
Use Case
State
Use Case Diagrams
Diagrams Diagrams
Object
Sequence Diagrams
Diagrams Diagrams
Diagram
Diagrams
s

Scenario State
Scenario State
Diagrams
Collaboration Diagrams
Component
Diagrams
Diagrams Diagrams
Diagrams
Models

Scenario Component
Scenario Component
Diagrams
Deployment
Diagrams
Statechart
Diagrams
Diagrams
Diagrams Diagrams
Activity

Diagrams
Three part of system’s model
1. Functional model
-Use case diagram
2. Object model
-Class diagram
3.Dynamic model
-sequence, Activity, State
1.6

Objects and the UML


• UML models systems as collections of objects
that interact to deliver benefit to outside
users
• Static structure
– What kinds of objects are important
– What are their relationships
• Dynamic behaviour
– Lifecycles of objects
– Object interactions to achieve goals
9
1.7

UML Structure
• Structure consists of

Building blocks Common mechanisms Architecture

10
Use case

Elements
Actor

State

Name
Class
Attributes

Method

11
Use case

12
1.8

UML building blocks


• Things
– Modelling elements
• Relationships
– Tie things together
• Diagrams
– Views showing interesting collections of things
– Are views of the model

13
1.8.1

Things
• Structural things – nouns of a UML model
– Class, interface, collaboration, use case, active class,
component, node
• Behavioural things – verbs of a UML model
– Interactions, state machine
• Grouping things
packag
– Package e
• Annotational things
– Notes

Some Information
about a thing
14
1.8.2

Relationships
relationship UML syntax brief semantics

The source element depends on the target element


dependency
and may be affected by changes to it.

association The description of a set of links between objects

aggregation
A relationship between classifiers where one classifier
realization specifies a contract that the other classifier
guarantees
to carry out

One element is specialization of another and may


generalization
be substituted for more general element

15
1.8.3

UML has 13 types of diagram

• Structure diagrams model the structure of the system (the static model)
• Behavior diagrams model the dynamic behavior of the system (the dynamic
model)
• Each type of diagram gives a different type of view of the model
16
1.9

UML common mechanisms


• UML has four common mechanisms that apply
consistently throughout the language:
– Specifications
– Adornments
– Common divisions
– Extensibility mechanisms

17
1.9.1

Specifications
BankAccount
semantic backplane
name
icon or accountNumber
modeling deposit()
Class specification
element withdraw()
calculateInterest(
)

Deposit Use case specification

Dependency specification

• Behind every UML modelling element is a specification which provides a textual


statement of the syntax and semantics of that element
• These specifications form the semantic backplane of the model
18
1.9.2

Adornments
• Every UML modelling
Window
element starts with a basic
symbol to which can be Window
added a number of {author = Jim, status = tested}

adornments specific to that +size : Area=(100,100)


#visibility : Boolean = false
symbol +defaultSize: Rectangle
• We only show adornments #maximumSize : Rectangle
-xptr : XWindow*
to increase the clarity of the
+create()
diagram or to highlight a +hide()
specific feature of the +display( location : Point )
-attachXWindow( xwin : XWindow*)
model
19
1.9.3

Common divisions
• Classifier and instance
– A classifier is an abstraction, an instance is a concrete
manifestation of that abstraction BankAccount

– The most common form is class/object e.g. a classifier balance


might be a BankAccount class, and an instance might be getBalance()
an object representing my bank account
– Generally instances have the same notation as classes, «instantiate»
but the instance name is underlined
myAccount:BankAccoun
• Interface and implementation t
balance = 100.0
• _The principle here is to separate what something does (its
interface) from how it does it (its implementation)
– An interface declares a contract and an implementation Borrowable

represents a concrete realization of that contract

LibraryItem

20
1.9.4

Extensibility mechanisms
note «entity» stereotype
constraint Ticket
{version = 1.1}
{ each Ticket tagged value
has a unique id } id

• Constraints
– Extends the semantics of an element by allowing us to add new rules about the element
– Written as { some constraint }
• Stereotypes
– A stereotype allows us to define a new UML modelling element based on an existing one
– We define the semantics of the stereotype ourselves
– Stereotypes add new elements to the UML metamodel
– Written as «stereotypeName»
– << >> called as guillemots
• Tagged values
– Allows us to add new, ad-hoc information to an element’s specification
– Written as { tag1 = value1, tag2 = value2 … }

21
1.9.4.2

Stereotype syntax options


stereotype name stereotype prefe
«entity» rred
in guillemets Ticket

stereotype icon prefe


icon rred
Ticket

stereotype name «entity»


and icon Ticket

stereotyped «control» «call»


Scheduler
relationship JobManager

• A stereotype introduces a new modelling element and so we must always define


semantics for our stereotypes
• Each model element can have many stereotypes
22
Student {Roll number is
unique}
RollNumber
Name
Branch

<<class
>>
23
1.9.4.4

UML profiles
• A profile customizes UML for a specific purposes
• A UML profile is a collection of stereotypes, tagged
values and constraints
– The tagged values and constraints are associated with
stereotypes
• Stereotypes extend one of the UML meta-model
elements (e.g. Class, Association)
– Any element that gets the stereotype also gets the
associated tagged values and constraints

24
1.10

Architecture
system assembly
vocabulary
configuration
functionality
management
Implementation
Design view
view

behaviour Use case


view

Process view Deployment view

performance system topology


scalability distribution
throughput delivery
“4+1” view of Architecture installation

25
Model Driven Architecture
• The Model-Driven Architecture (MDA) is a
software design approach that was officially
launched in 2001 by its sponsor, the Object
Management Group (OMG).
• MDA is intended to support model-driven
engineering of software systems. The MDA is a
specification that provides a set of guidelines for
structuring specifications expressed as models
• Model-Driven Engineering (or MDE) refers to the
systematic use of models as primary engineering
artifacts throughout the engineering lifecycle.

26
Model-Driven Architecture (MDA)
In MDA, platform-independent models (PIMs) are
initially expressed in a platform-independent
modeling language, such as UML.
The platform-independent model is subsequently
translated to a platform-specific model (PSM) by
mapping the PIM to some implementation language
or platform (e.g., Java) using formal rules
MDA
Platform
map Platform generate Code
Independen
Specific
t
Model
Model
deplo
y

27
28
1.11

Summary
• The UML is composed of building blocks:
– Things
– Relationships
– Diagrams
• The UML has four common mechanisms:
– Specifications
– Adornments
– Common divisions
– Extensibility mechanisms
• The UML is based on a 4+1 view of system architecture

29

You might also like