Class Diagram elements

● Relationships among instances
● Association:

An association is a relationship
between the members of two classes
● Notation: An association is drawn as a solid line
between two classes.

1
Class Diagram elements

● Relationships among instances
● Association

● Association name: An association may have a
name. The name can be left empty.
● Association end: An association has two ends. Each
end is the name a role, and is used to refer to the
associated object

2
Class Diagram elements

● Relationships among instances
● Aggregation

(Shared association) is an association
represents a shared ownership relationship.
● Notation: An aggregation is shown as binary
association decorated with a hollow diamond as a
terminal adornment at the aggregate end of the
association line

3
Class Diagram elements

● Relationships among instances
● Composition:

An association represents a whole-part
relationship. A composition is a “strong” form of
aggregation, if a composite (whole) is deleted, all of its
composite parts are “normally” deleted with it.
● Notation: Composite aggregation is depicted as a binary
association decorated with a filled black diamond at the
aggregate (whole) end

4
Class Diagram elements

● Relationships among classes
● Generalization:

The specific class inherits part of its
definition from the general class.
● Notation: A generalization is shown as a line with a
hollow triangle as an arrowhead between the symbols
representing the involved classifiers. The arrowhead
points to the symbol representing the general classifier.

5
Class Diagram elements

● Relationships among classes
● Realization:

is a specialized abstraction relationship
between two sets of model elements, one representing
a specification (the supplier) and the other represents
an implementation of the latter(the client).
● Notation: A generalization is shown as a line with a
hollow triangle as an arrowhead between the
symbols representing the involved classifiers. The
arrowhead points to the symbol representing the
general classifier

6
Class Diagram elements

● Relationships among classes
● Dependency:

is a relationship that signifies that a
single or a set of model elements requires other model
elements for their specification or implementation. This
means that the complete semantics of the depending
elements is either semantically or structurally
dependent on the definition of the supplier element(s)
● Notation: A dependency is shown as a dashed arrow
pointing from the client (dependent) at the tail to the
supplier (provider) at the arrowhead.

7
Class Diagram elements

● Multiplicity

● is a definition of cardinality, i.e., number of elements, is
used to indicates how many of the objects at this end
can be linked to each object at the other.
● Multiplicity interval has some lower bound and
(possibly infinite) upper bound. Lower and upper
bounds could be natural constants or constant
expressions evaluated to natural (non negative)
number. Upper bound ’*’ which denotes unlimited
number of elements. Upper bound >= lower bound.
0..0/0: Collection must be empty; 0..1: No instances
or one instance; 1..1/1: Exactly one instance; 0.. */*:
Zero or more instances; 1..*: At least one instance;
m..n: At least m but no more than n instances
8
Class Diagram example

(created by Visual Paradigm for UML 10.2)
9

More Related Content

PPTX
Java interfaces
PPTX
C# Interface | Interfaces In C# | C# Interfaces Explained | C# Tutorial For B...
PPTX
Interface in java
PPTX
Interfaces in java
PPTX
Java interface
PDF
8 abstract classes and interfaces
Java interfaces
C# Interface | Interfaces In C# | C# Interfaces Explained | C# Tutorial For B...
Interface in java
Interfaces in java
Java interface
8 abstract classes and interfaces

What's hot (20)

PPTX
Java interfaces
PPTX
interface in c#
PPT
PDF
javainterface
PPTX
Javainterface
PPTX
Lecture 18
PDF
Interface
PDF
New c sharp3_features_(linq)_part_v
PPTX
Abstraction in java [abstract classes and Interfaces
PPT
Java interfaces & abstract classes
PPTX
Week 1: Getting Your Hands Dirty - Part 1
PPTX
Week 2: Getting Your Hands Dirty – Part 2
PDF
What are Abstract Classes in Java | Edureka
PPTX
Interfaces and abstract classes
PPTX
Abstract Class & Abstract Method in Core Java
PDF
SE_Lec 07_UML CLASS DIAGRAM
PPTX
8abstact class in c#
PPT
Abstract class in java
PPTX
Computer programming - variables constants operators expressions and statements
Java interfaces
interface in c#
javainterface
Javainterface
Lecture 18
Interface
New c sharp3_features_(linq)_part_v
Abstraction in java [abstract classes and Interfaces
Java interfaces & abstract classes
Week 1: Getting Your Hands Dirty - Part 1
Week 2: Getting Your Hands Dirty – Part 2
What are Abstract Classes in Java | Edureka
Interfaces and abstract classes
Abstract Class & Abstract Method in Core Java
SE_Lec 07_UML CLASS DIAGRAM
8abstact class in c#
Abstract class in java
Computer programming - variables constants operators expressions and statements
Ad
Ad

Similar to Bai giang-uml-21jan14 (20)

PDF
Lecture05-Structural Modeling for students.pdf
PDF
Class diagram and its importance in software
PPTX
210280107093_CLASS_DIAGRAM.pptx
PPT
SDA ClassDiagram.ppt
DOCX
Chapterunifiedmo 3 UML Class Diagram.docx
PPTX
Basic structural modelling in unified modelling language
PPTX
Class Diagram | OOP and Design Patterns by Oum Saokosal
PPTX
Fundamentals of Software Engineering
PPT
08 class and sequence diagrams
PPT
Object and class relationships
PPT
Uml class-diagram
PPT
Week 10-classdiagrams.pptdddddddddddddddddddddddddddd
PPTX
CLASS DIAGRAMS IN OBJECT ORIENTED ANALYSIS AND DESIGN
PPT
Ch06
PDF
Session13-Class Diagram (1).pdf
PPT
Class diagram
PPT
Uml unified-modeling-language-presented by dileep
PPT
Chapter 2-Unified Modeling Languagee.ppt
PPT
Chapter 2-Unified Modeling Languagee.ppt
PDF
Lecture 4-oop class diagram
Lecture05-Structural Modeling for students.pdf
Class diagram and its importance in software
210280107093_CLASS_DIAGRAM.pptx
SDA ClassDiagram.ppt
Chapterunifiedmo 3 UML Class Diagram.docx
Basic structural modelling in unified modelling language
Class Diagram | OOP and Design Patterns by Oum Saokosal
Fundamentals of Software Engineering
08 class and sequence diagrams
Object and class relationships
Uml class-diagram
Week 10-classdiagrams.pptdddddddddddddddddddddddddddd
CLASS DIAGRAMS IN OBJECT ORIENTED ANALYSIS AND DESIGN
Ch06
Session13-Class Diagram (1).pdf
Class diagram
Uml unified-modeling-language-presented by dileep
Chapter 2-Unified Modeling Languagee.ppt
Chapter 2-Unified Modeling Languagee.ppt
Lecture 4-oop class diagram

More from TRAN Khanh Dung, Khoa CNTT, Đại Học Xây Dựng (16)

Recently uploaded (20)

PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
Introduction to pro and eukaryotes and differences.pptx
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
Uderstanding digital marketing and marketing stratergie for engaging the digi...
PPTX
Computer Architecture Input Output Memory.pptx
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
HVAC Specification 2024 according to central public works department
PPTX
Virtual and Augmented Reality in Current Scenario
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Weekly quiz Compilation Jan -July 25.pdf
Introduction to pro and eukaryotes and differences.pptx
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Uderstanding digital marketing and marketing stratergie for engaging the digi...
Computer Architecture Input Output Memory.pptx
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
AI-driven educational solutions for real-life interventions in the Philippine...
HVAC Specification 2024 according to central public works department
Virtual and Augmented Reality in Current Scenario
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...

Bai giang-uml-21jan14

  • 1. Class Diagram elements ● Relationships among instances ● Association: An association is a relationship between the members of two classes ● Notation: An association is drawn as a solid line between two classes. 1
  • 2. Class Diagram elements ● Relationships among instances ● Association ● Association name: An association may have a name. The name can be left empty. ● Association end: An association has two ends. Each end is the name a role, and is used to refer to the associated object 2
  • 3. Class Diagram elements ● Relationships among instances ● Aggregation (Shared association) is an association represents a shared ownership relationship. ● Notation: An aggregation is shown as binary association decorated with a hollow diamond as a terminal adornment at the aggregate end of the association line 3
  • 4. Class Diagram elements ● Relationships among instances ● Composition: An association represents a whole-part relationship. A composition is a “strong” form of aggregation, if a composite (whole) is deleted, all of its composite parts are “normally” deleted with it. ● Notation: Composite aggregation is depicted as a binary association decorated with a filled black diamond at the aggregate (whole) end 4
  • 5. Class Diagram elements ● Relationships among classes ● Generalization: The specific class inherits part of its definition from the general class. ● Notation: A generalization is shown as a line with a hollow triangle as an arrowhead between the symbols representing the involved classifiers. The arrowhead points to the symbol representing the general classifier. 5
  • 6. Class Diagram elements ● Relationships among classes ● Realization: is a specialized abstraction relationship between two sets of model elements, one representing a specification (the supplier) and the other represents an implementation of the latter(the client). ● Notation: A generalization is shown as a line with a hollow triangle as an arrowhead between the symbols representing the involved classifiers. The arrowhead points to the symbol representing the general classifier 6
  • 7. Class Diagram elements ● Relationships among classes ● Dependency: is a relationship that signifies that a single or a set of model elements requires other model elements for their specification or implementation. This means that the complete semantics of the depending elements is either semantically or structurally dependent on the definition of the supplier element(s) ● Notation: A dependency is shown as a dashed arrow pointing from the client (dependent) at the tail to the supplier (provider) at the arrowhead. 7
  • 8. Class Diagram elements ● Multiplicity ● is a definition of cardinality, i.e., number of elements, is used to indicates how many of the objects at this end can be linked to each object at the other. ● Multiplicity interval has some lower bound and (possibly infinite) upper bound. Lower and upper bounds could be natural constants or constant expressions evaluated to natural (non negative) number. Upper bound ’*’ which denotes unlimited number of elements. Upper bound >= lower bound. 0..0/0: Collection must be empty; 0..1: No instances or one instance; 1..1/1: Exactly one instance; 0.. */*: Zero or more instances; 1..*: At least one instance; m..n: At least m but no more than n instances 8
  • 9. Class Diagram example (created by Visual Paradigm for UML 10.2) 9