SlideShare a Scribd company logo
1 of 20
INTRODUCTION TO UML
Prepared By
Ms. R. Gomathijayam
Assistant Professor of CA
Bon Secours College
Thanjavur
UML – Unified Modeling Language
• Union of all Modeling Languages
– Use case diagrams
– Class diagrams
– Object diagrams
– Sequence diagrams
– Collaboration diagrams
– Statechart diagrams
– Activity diagrams
– Component diagrams
– Deployment diagrams
– ….
• Very big, but a nice standard that has been
embraced by the industry.
Object diagram (≠ class diagram)
• individual objects (heap layout)
– objectName : type
– attribute = value
• lines show
field
references
• Class diagram:
– summary of all possible object
diagrams
Object diagram
example
UML class diagrams
• UML class diagram: a picture of
– the classes in an OO system
– their fields and methods
– connections between the classes
• that interact or inherit from each other
• Not represented in a UML class diagram:
– details of how the classes interact with each
other
– algorithmic details; how a particular
behavior is implemented
Diagram of one class
• class name in top of box
– write <<interface>> on top of interfaces'
names
– use italics for an abstract class name
• attributes (optional)
– should include all fields of the object
• operations / methods (optional)
– may omit trivial (get/set) methods
• but don't omit any methods from an
interface!
– should not include inherited methods
Class attributes / fields
• attributes (fields, instance variables)
– visibility name : type [count] =
default_value
– visibility: + public
# protected
- private
~ package
(default)
/ derived
– underline static attributes
– derived attribute: not stored, but can
be computed from other attribute
values
• “specification fields “ from CSE 331
– attribute example:
- balance : double = 0.00
Class operations / methods
• operations / methods
– visibility name (parameters) :
return_type
– visibility: + public
# protected
- private
~ package
(default)– underline static methods
– parameter types listed as (name:
type)
– omit return_type on constructors
and when return type is void
– method example:
+ distance(p1: Point, p2: Point):
double
Relationships between classes
• generalization: an inheritance
relationship
– inheritance between classes
– interface implementation
• association: a usage relationship
– dependency
– aggregation
– composition
Generalization (inheritance)
relationships
• hierarchies drawn top-down
• arrows point upward to parent
• line/arrow styles indicate whether parent
is a(n):
– class:
solid line, black arrow
– abstract class:
solid line, white arrow
– interface:
dashed line, white arrow
• often omit trivial / obvious generalization
relationships, such as drawing the Object
class as a parent
Associational relationships
• associational (usage)
relationships1.
multiplicity
(how many are
used)• *  0, 1, or more
• 1  1 exactly
• 2..4  between 2 and 4, inclusive
• 3..*  3 or more (also written as
“3..”)
2. name
3. navigabilit
y
(what relationship the objects
have)
(direction
)
 one-to-one
 each student must carry exactly one ID card
 one-to-many
 one rectangle list can contain many rectangles
Multiplicity of Associations
Association types
• aggregation: “is part of”
– symbolized by a clear white
diamond
• composition: “is entirely made
of”
– stronger version of aggregation
– the parts live and die with the
whole
– symbolized by a black diamond
• dependency: “uses
temporarily”
– symbolized by dotted line
– often is an implementation
1
1
Car
aggregation
Engine
Lottery
Ticket
Random
dependency
Page
Book
composition
*
1
Composition/aggregation example
Class diagram example
Aggregation – Order class
contains OrderDetail
classes. Could be
composition?
Noarrows;infocan
flowinboth directions
UML example: people
26
Class diagram:
voter
s
Class diagram example:
student
StudentBody
+ main (args : String[])
1 100
Student
- firstName : String
- lastName : String
- homeAddress : Address
- schoolAddress : Address
+ toString() : String
Address
- streetAddress : String
- city : String
- state : String
- zipCode : long
+ toString() : String
Tools for creating UML diagrams
• Violet (free)
– http://horstmann.com/violet/
• Rational Rose
– http://www.rational.com/
• Visual Paradigm UML Suite
(trial)
– http://www.visual-paradigm.com/
– (nearly) direct download link:
http://www.visual-
paradigm.com/vp/download.jsp?product=vpuml&edition=ce
(there are many others, but most are commercial)
THANK YOU

More Related Content

What's hot

MSTC'14 (windows 8 + windows phone) Workshops_Day 2
MSTC'14 (windows 8 + windows phone) Workshops_Day 2MSTC'14 (windows 8 + windows phone) Workshops_Day 2
MSTC'14 (windows 8 + windows phone) Workshops_Day 2
Amira Gamal
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
CherryBerry2
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
Pooja mittal
 

What's hot (19)

Uml class-diagram
Uml class-diagramUml class-diagram
Uml class-diagram
 
Class diagram presentation
Class diagram presentationClass diagram presentation
Class diagram presentation
 
Uml class Diagram
Uml class DiagramUml class Diagram
Uml class Diagram
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
 
RDBMS ERD
RDBMS ERDRDBMS ERD
RDBMS ERD
 
MSTC'14 (windows 8 + windows phone) Workshops_Day 2
MSTC'14 (windows 8 + windows phone) Workshops_Day 2MSTC'14 (windows 8 + windows phone) Workshops_Day 2
MSTC'14 (windows 8 + windows phone) Workshops_Day 2
 
Uml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot netUml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot net
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
 
Uml
UmlUml
Uml
 
Uml in software engineering
Uml in software engineeringUml in software engineering
Uml in software engineering
 
Class diagram- UML diagram
Class diagram- UML diagramClass diagram- UML diagram
Class diagram- UML diagram
 
Class diagram
Class diagramClass diagram
Class diagram
 
Relations Class Diagram
Relations Class DiagramRelations Class Diagram
Relations Class Diagram
 
ER diagram
ER diagramER diagram
ER diagram
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
class diagram
class diagramclass diagram
class diagram
 
Lecture12 software design class diagram
Lecture12 software design class diagramLecture12 software design class diagram
Lecture12 software design class diagram
 
2 class use case
2 class use case2 class use case
2 class use case
 

Similar to Uml ppt

Relationships and their representation in a class diagram.pptx
Relationships and their representation in a class diagram.pptxRelationships and their representation in a class diagram.pptx
Relationships and their representation in a class diagram.pptx
nesarahmad37
 
An introduction to uml
An introduction to umlAn introduction to uml
An introduction to uml
Tony Huynh
 
entity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.pptentity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.ppt
IRWANBINISMAILKPMGur1
 

Similar to Uml ppt (20)

1. introduction to uml
1. introduction to uml1. introduction to uml
1. introduction to uml
 
Relationships and their representation in a class diagram.pptx
Relationships and their representation in a class diagram.pptxRelationships and their representation in a class diagram.pptx
Relationships and their representation in a class diagram.pptx
 
SW SEC 1.pptx
SW SEC 1.pptxSW SEC 1.pptx
SW SEC 1.pptx
 
06 class diagrams
06 class diagrams06 class diagrams
06 class diagrams
 
Unified modeling language
Unified modeling languageUnified modeling language
Unified modeling language
 
SDA ClassDiagram.ppt
SDA ClassDiagram.pptSDA ClassDiagram.ppt
SDA ClassDiagram.ppt
 
Claas diagram
Claas diagramClaas diagram
Claas diagram
 
Claas diagram
Claas diagramClaas diagram
Claas diagram
 
classes & objects introduction
classes & objects introductionclasses & objects introduction
classes & objects introduction
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UML
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Introduction to UML, a guide to learn.pdf
Introduction to UML, a guide to learn.pdfIntroduction to UML, a guide to learn.pdf
Introduction to UML, a guide to learn.pdf
 
UML-class_diagram.ppt
UML-class_diagram.pptUML-class_diagram.ppt
UML-class_diagram.ppt
 
UML-class diagram for beginners to adance.ppt
UML-class diagram for beginners to adance.pptUML-class diagram for beginners to adance.ppt
UML-class diagram for beginners to adance.ppt
 
Unified modeling language
Unified modeling languageUnified modeling language
Unified modeling language
 
Unit i b(er model)
Unit i b(er model)Unit i b(er model)
Unit i b(er model)
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
An introduction to uml
An introduction to umlAn introduction to uml
An introduction to uml
 
entity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.pptentity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.ppt
 

More from Rajamanickam Gomathijayam (9)

Computer Application in Business
Computer Application in BusinessComputer Application in Business
Computer Application in Business
 
Sololearn cert
Sololearn certSololearn cert
Sololearn cert
 
Coding for php with mysql
Coding for php with mysqlCoding for php with mysql
Coding for php with mysql
 
Php with mysql ppt
Php with mysql pptPhp with mysql ppt
Php with mysql ppt
 
Corel Draw Introduction
Corel Draw IntroductionCorel Draw Introduction
Corel Draw Introduction
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphics
 
Introducction to Algorithm
Introducction to AlgorithmIntroducction to Algorithm
Introducction to Algorithm
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Network Concepts
Network ConceptsNetwork Concepts
Network Concepts
 

Recently uploaded

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 

Uml ppt

  • 1. INTRODUCTION TO UML Prepared By Ms. R. Gomathijayam Assistant Professor of CA Bon Secours College Thanjavur
  • 2. UML – Unified Modeling Language • Union of all Modeling Languages – Use case diagrams – Class diagrams – Object diagrams – Sequence diagrams – Collaboration diagrams – Statechart diagrams – Activity diagrams – Component diagrams – Deployment diagrams – …. • Very big, but a nice standard that has been embraced by the industry.
  • 3. Object diagram (≠ class diagram) • individual objects (heap layout) – objectName : type – attribute = value • lines show field references • Class diagram: – summary of all possible object diagrams
  • 5. UML class diagrams • UML class diagram: a picture of – the classes in an OO system – their fields and methods – connections between the classes • that interact or inherit from each other • Not represented in a UML class diagram: – details of how the classes interact with each other – algorithmic details; how a particular behavior is implemented
  • 6. Diagram of one class • class name in top of box – write <<interface>> on top of interfaces' names – use italics for an abstract class name • attributes (optional) – should include all fields of the object • operations / methods (optional) – may omit trivial (get/set) methods • but don't omit any methods from an interface! – should not include inherited methods
  • 7. Class attributes / fields • attributes (fields, instance variables) – visibility name : type [count] = default_value – visibility: + public # protected - private ~ package (default) / derived – underline static attributes – derived attribute: not stored, but can be computed from other attribute values • “specification fields “ from CSE 331 – attribute example: - balance : double = 0.00
  • 8. Class operations / methods • operations / methods – visibility name (parameters) : return_type – visibility: + public # protected - private ~ package (default)– underline static methods – parameter types listed as (name: type) – omit return_type on constructors and when return type is void – method example: + distance(p1: Point, p2: Point): double
  • 9. Relationships between classes • generalization: an inheritance relationship – inheritance between classes – interface implementation • association: a usage relationship – dependency – aggregation – composition
  • 10. Generalization (inheritance) relationships • hierarchies drawn top-down • arrows point upward to parent • line/arrow styles indicate whether parent is a(n): – class: solid line, black arrow – abstract class: solid line, white arrow – interface: dashed line, white arrow • often omit trivial / obvious generalization relationships, such as drawing the Object class as a parent
  • 11. Associational relationships • associational (usage) relationships1. multiplicity (how many are used)• *  0, 1, or more • 1  1 exactly • 2..4  between 2 and 4, inclusive • 3..*  3 or more (also written as “3..”) 2. name 3. navigabilit y (what relationship the objects have) (direction )
  • 12.  one-to-one  each student must carry exactly one ID card  one-to-many  one rectangle list can contain many rectangles Multiplicity of Associations
  • 13. Association types • aggregation: “is part of” – symbolized by a clear white diamond • composition: “is entirely made of” – stronger version of aggregation – the parts live and die with the whole – symbolized by a black diamond • dependency: “uses temporarily” – symbolized by dotted line – often is an implementation 1 1 Car aggregation Engine Lottery Ticket Random dependency Page Book composition * 1
  • 15. Class diagram example Aggregation – Order class contains OrderDetail classes. Could be composition? Noarrows;infocan flowinboth directions
  • 18. Class diagram example: student StudentBody + main (args : String[]) 1 100 Student - firstName : String - lastName : String - homeAddress : Address - schoolAddress : Address + toString() : String Address - streetAddress : String - city : String - state : String - zipCode : long + toString() : String
  • 19. Tools for creating UML diagrams • Violet (free) – http://horstmann.com/violet/ • Rational Rose – http://www.rational.com/ • Visual Paradigm UML Suite (trial) – http://www.visual-paradigm.com/ – (nearly) direct download link: http://www.visual- paradigm.com/vp/download.jsp?product=vpuml&edition=ce (there are many others, but most are commercial)