UML Diagrams- Unified Modeling Language Introduction
ramakantsoni
3,666 views
40 slides
Apr 26, 2015
Slide 1 of 40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
About This Presentation
Descriptive slides for Introduction to UML (Unified Modeling Design) diagrams.
Size: 1.28 MB
Language: en
Added: Apr 26, 2015
Slides: 40 pages
Slide Content
Lecture 1: Introduction
Duration : 3 HRS
Object Oriented Modeling with UML
by
RamakantSoni
Assistant Professor
Dept. of Computer Science
B. K. Birla Institute of Engineering & Technology, Pilani
Ramakant Soni @ BKBIET Pilani 1
Objective of the module
Objective1:
Thiscourseistolearnmodelinganddesignprograms
usingtheobjectapproach.ThelanguageusedisUML.
Objective2:Objective2:
Toprovideasoftwaredevelopmentmethodology
startingtherealworlduntilthecompletionofthe
program
Objective3:
Learnhowtodesignobjectsinviewofreusability.
Ramakant Soni @ BKBIET Pilani 2
What is a Model?
Definition 1:
In (computers) Model is a simulation to reproduce
behavior of a system.
Definition 2:
Ramakant Soni @ BKBIET Pilani 3
Definition 2:
It’s the representation of entities and relationships
between them.
Definition 3:
A model serves as an abstraction -an approximate
representation of the real item that is being built.
What is modeling?
Definition1:Definition1:
Processofrepresentingareal-worldobjectorphenomenonas
asetofmathematicalequations.
Definition2:
Designingandanalyzingamathematicalrepresentationofan
economicsystemtostudytheeffectofchangestosystem
variables.
Ramakant Soni @ BKBIET Pilani 4
Why to model?
•Itisneithertechnicallywisenoreconomicallypracticalto
buildcertainkindofcomplexsystemswithoutfirstcreating
adesign,ablueprintoranotherabstractrepresentation.
Forexample:Professionalarchitectneedstofirstdevelop
anarrayofarchitecturalplansbeforeconstructingamulti-
officebuilding.officebuilding.
•Modelingprovidesarchitectsandotherswiththeabilityto
visualizeentiresystems,assessdifferentoptionsand
communicatedesignsmoreclearlybeforetakingonthe
risks-technical,financialorotherwiseofactual
construction.
Ramakant Soni @ BKBIET Pilani 5
When do we model?
Some specific situations in which the modeling effort is
worthwhile include:
•To better understand the business or engineering
situation at hand ("as-is" model) and to craft a better
system ("to-be" model).
situation at hand ("as-is" model) and to craft a better
system ("to-be" model).
•To build and design a system architecture.
•To create visualizations of code and other forms of
implementation.
Ramakant Soni @ BKBIET Pilani 6
How do We model?
•Astandardmeansforrepresentingsoftwaremodelsandrelated
artifacts.
Softwarearchitects,designersanddevelopersuseUMLforspecifying,
visualizing,constructinganddocumentingallaspectsofasoftware
system.
KeyleadersfromIBMRationalledtheoriginaldevelopmentofUML.
Today,UMLismanagedbytheObjectManagementGroup(OMG),which
ensurethatthespecificationcontinuestomeetthedynamicneedsofthe
softwarecommunity.softwarecommunity.
•UMLismorethanjustagraphicalnotationalstandard--itisamodeling
language.
Aswithalllanguages,UMLdefinessyntax(bothgraphicalandtextual)and
semantics(theunderlyingmeaningsofthesymbolsandtext).Havinga
truemodelinglanguageratherthanjustastandardnotationisessential
forstandardizingtheuseofUML.UML--atruemodelinglanguage--has
helpeditbecomethesoftwareindustry'smostrecognizedandwidely
applicablemodelingstandard.
Ramakant Soni @ BKBIET Pilani 7
ObjectResponsibilities
Objects (classes) have responsibilities, which they
are expected to exhibit in an object-oriented
information:
•What they know about themselves -:(Attributes)•What they know about themselves -:(Attributes)
•What they do -: (Operations)
•What they know about other objects-:(Class and
object relationships)
Ramakant Soni @ BKBIET Pilani 9
Object Oriented Concept
Following are some fundamental concepts of object oriented world:
•Objects: Objects represent an entity and the basic building block.
•Class: Class is the blue print of an object.
•Abstraction: Abstraction represents the behavior of an real world entity.
•Encapsulation: Encapsulation is the mechanism of binding the data
together and hiding them from outside world.
•Inheritance: Inheritance is the mechanism of making new classes from
existing one.
•Polymorphism: It defines the mechanism to exists in different forms.
Ramakant Soni @ BKBIET Pilani 11
UML
•The key thing to remember about UML is that
it is designed to be universal, it is intended to
be independent of implementation platform.
Specifically it is a PIM, a platform-independent Specifically it is a PIM, a platform-independent
model.
Ramakant Soni @ BKBIET Pilani 12
4 parts to the UML 2.x specification:
•The Superstructure that defines the notation and
semantics for diagrams and their model elements.
•The Infrastructure that defines the core meta-model on
which the Superstructure is based.which the Superstructure is based.
•The Object Constraint Language (OCL) for defining rules
for model elements.
•The UML Diagram Interchange that defines how UML 2
diagram layouts are exchanged.
Ramakant Soni @ BKBIET Pilani 14
Areas where UML is effectively used
UML has been used effectively in following areas:
•Enterprise information systems.
•Banking and financial services.
•Telecommunications.
•Transportation.•Transportation.
•Defense.
•Retail.
•Medical electronics.
•Science and Research.
•Distributed Web-based services.
Ramakant Soni @ BKBIET Pilani 17
Why modeling with UML is used
•Modelingprovidesstructureforproblemsolving.
•Ifwemodelasystem,wemayfindmultiplesolutions.
•Modelinghelpsusmanagethecomplexityofsystemsbefore
actuallystartingdevelopmentwork.
•WithvariousdiagramsfromUMLwecanshowclearviewsof•WithvariousdiagramsfromUMLwecanshowclearviewsof
systemthusreducingtime-to-marketforbusinessproblem
solutions.
•Ifwemodelanyproblembeforeitsdevelopmentthereare
fewerchancesthatourdevelopmentplanwillgowrong,thus
decreasingdevelopmentcosts.
•Modelingreducestheriskofmistakes.
Ramakant Soni @ BKBIET Pilani 18
UML Diagram Hierarchy
Ramakant Soni @ BKBIET Pilani 24
Ramakant Soni @ BKBIET Pilani 25
UML Building Blocks
The building blocks of UML can be defined as:
1.Things
2.Relationships
3.Diagrams3.Diagrams
Ramakant Soni @ BKBIET Pilani 26
UML Building Blocks
Thingscanbedefinedas:Structural,Behavioral,
Grouping&An-notational.
Relationshipshowshowelementsareassociated
witheachotherandthisassociationdescribesthewitheachotherandthisassociationdescribesthe
functionalityofanapplication.
UMLdiagrams:Alltheelements,relationshipsare
usedtomakeacompleteUMLdiagramandthe
diagramrepresentsasystem.
Ramakant Soni @ BKBIET Pilani 27
Structural things
TheStructuralthingsdefinethestaticpartofthemodel.Theyrepresent
physicalandconceptualelements.
Structuralthingsconstitutes:
•Class: Class represents set of objects having similar responsibilities.
Ramakant Soni @ BKBIET Pilani 28
Interface
Interfacedefinesasetofoperationswhichspecifythe
responsibilityofaclass.
Ramakant Soni @ BKBIET Pilani 29
I
Interface
Collaboration:
Collaboration defines interaction between elements.
Ramakant Soni @ BKBIET Pilani 30
Use case:
Use case represents a set of actions performed by a system for a specific goal.
Ramakant Soni @ BKBIET Pilani 31
Component
Component describes physical part of a system.
Ramakant Soni @ BKBIET Pilani 32
Node
A node can be defined as a physical element that exists at run time.
Ramakant Soni @ BKBIET Pilani 33
Behavioral things:
•A behavioral thing consists of the dynamic
parts of UML models.
Ramakant Soni @ BKBIET Pilani 34
State machine:
•Statemachineisusefulwhenthestateofanobject
initslifecycleisimportant.Itdefinesthesequence
ofstatesanobjectgoesthroughinresponseto
events.Eventsareexternalfactorsresponsiblefor
statechange.
Ramakant Soni @ BKBIET Pilani 36
Package:
•Package is the only one grouping thing available for gathering
structural and behavioral things.
Ramakant Soni @ BKBIET Pilani 37
Annotationalthings:
•Annotationalthings can be defined as a mechanism to
capture remarks, descriptions, and comments of UML model
elements. Note is the only one Annotationalthing available.
Ramakant Soni @ BKBIET Pilani 38
Notes