SlideShare a Scribd company logo
16
Most read
18
Most read
19
Most read
UNIT I UML DIAGRAMS
Introduction to OOAD – Unified Process –
UML diagrams – Use Case – Class Diagrams–
Interaction Diagrams – State Diagrams –
Activity Diagrams –
Package, component and Deployment Diagrams.
Class Diagram
A type of static structure diagram
that describes the structure of a system
Class Diagram
• Class diagram is a static diagram
– It represents the static view of an application
• Class diagram shows a collection of classes, interfaces, associations,
collaborations and constraints.
– It is also known as a structural diagram.
• Purpose of Class Diagram
– Analysis and design of the static view of an application.
– Describe responsibilities of a system.
– Base for component and deployment diagrams.
– Forward and reverse engineering.
Class Diagram
• A no. of classes are identified & grouped together in a class diagram
– That helps to determine the static relations between them.
• To further describe the behavior of systems,
– Class diagrams can be complemented by a state diagram or UML
state machine.
Notations in Class Diagram
• It shows the
1. Classes in a system,
2. Attributes and operations of each class and
3. Relationship between each class.
• Classes are represented as boxes with 3 sections
– Name at the top,
– Attributes in the middle and
– Operations or methods at
the bottom
Notations - Members Visibility
• To specify the visibility of a class member
(i.e. any attribute or method),
– These notations must be placed before the member's name
+ Public
- Private
# Protected
/
Derived (can be
combined with one
of the others)
~ Package
Relationships
• A relationship covers the specific types of logical connections
found on class and object diagrams.
• UML shows the following relationships:
Dependency
– Connection b/w dependent and independent model elements
– Dependency is represented by a dotted arrow
– Arrow head represents the independent element and the other end the
dependent element.
Association
• Represent the relationship b/w two elements of a system
– Describes how the elements in an UML diagram are associated
– Represented by a dotted line with (without) arrows on both sides
– Multiplicity is mentioned at the ends
Multiplicity in UML
• Multiplicity allows to specify cardinality
i.e. number of elements - of some collection of elements.
• Multiplicity interval has some lower bound and upper bound
• Some typical examples of multiplicity
Multiplicity Option Cardinality
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
5..5 5 Exactly 5 instances
m..n At least m but no more than n instances
Example
Two or more Player actors are required
to initiate Play Game use case.
Multiplicity of Players for Soccer Team class
Aggregation
• Aggregation is a special case of association.
• When an object ‘has-a’ another object,
– Then you have got an aggregation between them.
• Direction specifies which object contains the other object.
• Aggregation is also called a “Has-a” relationship
Example:
A Library contains students and books.
Relationship b/w library and student is aggregation.
Composition
• Composition is a special case of aggregation.
• When an object contains the other object,
– If the contained object cannot exist without the existence of container object, then it is called composition.
Folder could contain many files,
while each File has exactly one Folder parent.
If Folder is deleted, all contained Files are deleted as well.
Hospital has 1 or more Departments,
Each Department belongs to exactly one Hospital.
If Hospital is closed, so are all of its Departments.
Example:
A Library contains students and books.
Relationship between library and book is composition.
A student can exist without a library and therefore it is aggregation.
A book cannot exist without a library and therefore its a composition.
Generalization
• Generalization uses a “is-a” relationship
• At a very broader level you can understand this as inheritance.
Example:
Consider there exists a class named Person.
A student is a person.
A faculty is a person.
Here the relationship b/w student & person, similarly faculty & person is generalization.
shared target style.separate target style
Realization
• A realization relationship is a relationship between two model element
– One element (client) realizes (implements) the behavior that the other element (supplier) specifies.
• In OOP, realization represents the implementation of an interface by a class.
06 class diagrams
06 class diagrams
06 class diagrams
06 class diagrams

More Related Content

PPTX
Organized and disorganized complexity
PPT
Uml class diagram and packages ppt for dot net
PDF
Mediator Design Pattern
PPT
UML Architecture and Views
PPT
Unit 2 -Cloud Computing Architecture
PPTX
Class Diagram
PPTX
Advanced Structural Modeling
DOCX
Uml Common Mechanism
Organized and disorganized complexity
Uml class diagram and packages ppt for dot net
Mediator Design Pattern
UML Architecture and Views
Unit 2 -Cloud Computing Architecture
Class Diagram
Advanced Structural Modeling
Uml Common Mechanism

What's hot (20)

PDF
Software architecture
PPT
Class diagram presentation
PPTX
Adjustment of inheritance
PPTX
Java Spring Framework
PDF
Detailed Analysis of AWS Lambda vs EC2
PPTX
Architectural structures and views
PDF
PPT
Object Oriented Relationships
PPTX
Cloud Infrastructure Mechanisms
PPTX
Basic Behavioral Modeling
PPT
Object-Oriented Analysis and Design
PPT
ADO .Net
PDF
CS8592-OOAD Lecture Notes Unit-3
PPTX
Software architectural patterns - A Quick Understanding Guide
PPTX
3 tier architecture
PPTX
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
PPTX
SOA Principles : 6. service composibility
PPTX
J2EE Patterns
PPTX
Class and object_diagram
PPTX
Domain model Refinement
Software architecture
Class diagram presentation
Adjustment of inheritance
Java Spring Framework
Detailed Analysis of AWS Lambda vs EC2
Architectural structures and views
Object Oriented Relationships
Cloud Infrastructure Mechanisms
Basic Behavioral Modeling
Object-Oriented Analysis and Design
ADO .Net
CS8592-OOAD Lecture Notes Unit-3
Software architectural patterns - A Quick Understanding Guide
3 tier architecture
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
SOA Principles : 6. service composibility
J2EE Patterns
Class and object_diagram
Domain model Refinement
Ad

Similar to 06 class diagrams (20)

PPT
UML-class_diagram.ppt diagrams ppt download
PPT
UML-class diagram for beginners to adance.ppt
PPT
UML-class_diagram.ppt
PPT
cse 355 UML class diagram software engineering.ppt
PPT
Slide 5 Class Diagram
PPTX
Basic structural modelling in unified modelling language
PPTX
Relationships and their representation in a class diagram.pptx
PPTX
Unified Modeling Language and Examples .pptx
PPTX
FALLSEM2024-25_SWE2018_ETH_VL2024250103302_2024-10-04_Reference-Material-I.pptx
PPT
UML DIAGRAMS FOR IST SEMISTER OF BTECH STUDENTS
PPT
Object oriented programming in C++ programming language
PPT
Introduction to software engineering in data science.ppt
PPT
Object oriented programming language in software engineering
PPT
An Evolution of UML projects.and also what is project
PPTX
Fundamentals of Software Engineering
PPT
Uml class-diagram
PPTX
unit-1 &2 important questions to be noted
PPTX
Lecture 06.pptxLecture 06.pptxLecture 06.pptx
PPTX
CLASS DIAGRAMS IN OBJECT ORIENTED ANALYSIS AND DESIGN
PPTX
classdiagram.pptx
UML-class_diagram.ppt diagrams ppt download
UML-class diagram for beginners to adance.ppt
UML-class_diagram.ppt
cse 355 UML class diagram software engineering.ppt
Slide 5 Class Diagram
Basic structural modelling in unified modelling language
Relationships and their representation in a class diagram.pptx
Unified Modeling Language and Examples .pptx
FALLSEM2024-25_SWE2018_ETH_VL2024250103302_2024-10-04_Reference-Material-I.pptx
UML DIAGRAMS FOR IST SEMISTER OF BTECH STUDENTS
Object oriented programming in C++ programming language
Introduction to software engineering in data science.ppt
Object oriented programming language in software engineering
An Evolution of UML projects.and also what is project
Fundamentals of Software Engineering
Uml class-diagram
unit-1 &2 important questions to be noted
Lecture 06.pptxLecture 06.pptxLecture 06.pptx
CLASS DIAGRAMS IN OBJECT ORIENTED ANALYSIS AND DESIGN
classdiagram.pptx
Ad

More from Baskarkncet (20)

PPTX
Unit_I.pptx
PPTX
Cocomo model
PPTX
Unit 1
PPT
PPT
03 x files
PPT
03 namespace
PPT
02 xml schema
PPT
02 well formed and valid documents
PPT
00 introduction
PPT
01 xml document structure
PPT
11 deployment diagrams
PPT
10 component diagram
PPT
09 package diagram
PPT
08 state diagram and activity diagram
PPT
07 interaction diagrams
PPT
05 use case
PPT
03 unified process
PPT
02 uml
PPT
04 uml diagrams
PPT
01 introduction
Unit_I.pptx
Cocomo model
Unit 1
03 x files
03 namespace
02 xml schema
02 well formed and valid documents
00 introduction
01 xml document structure
11 deployment diagrams
10 component diagram
09 package diagram
08 state diagram and activity diagram
07 interaction diagrams
05 use case
03 unified process
02 uml
04 uml diagrams
01 introduction

Recently uploaded (20)

PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PPTX
CyberSecurity Mobile and Wireless Devices
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PPTX
Current and future trends in Computer Vision.pptx
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PPTX
Fundamentals of Mechanical Engineering.pptx
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PPTX
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PPTX
Management Information system : MIS-e-Business Systems.pptx
PPTX
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
"Array and Linked List in Data Structures with Types, Operations, Implementat...
CyberSecurity Mobile and Wireless Devices
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
distributed database system" (DDBS) is often used to refer to both the distri...
Current and future trends in Computer Vision.pptx
August 2025 - Top 10 Read Articles in Network Security & Its Applications
III.4.1.2_The_Space_Environment.p pdffdf
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
Fundamentals of Mechanical Engineering.pptx
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
Management Information system : MIS-e-Business Systems.pptx
CURRICULAM DESIGN engineering FOR CSE 2025.pptx
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...

06 class diagrams

  • 1. UNIT I UML DIAGRAMS Introduction to OOAD – Unified Process – UML diagrams – Use Case – Class Diagrams– Interaction Diagrams – State Diagrams – Activity Diagrams – Package, component and Deployment Diagrams.
  • 2. Class Diagram A type of static structure diagram that describes the structure of a system
  • 3. Class Diagram • Class diagram is a static diagram – It represents the static view of an application • Class diagram shows a collection of classes, interfaces, associations, collaborations and constraints. – It is also known as a structural diagram. • Purpose of Class Diagram – Analysis and design of the static view of an application. – Describe responsibilities of a system. – Base for component and deployment diagrams. – Forward and reverse engineering.
  • 4. Class Diagram • A no. of classes are identified & grouped together in a class diagram – That helps to determine the static relations between them. • To further describe the behavior of systems, – Class diagrams can be complemented by a state diagram or UML state machine.
  • 5. Notations in Class Diagram • It shows the 1. Classes in a system, 2. Attributes and operations of each class and 3. Relationship between each class. • Classes are represented as boxes with 3 sections – Name at the top, – Attributes in the middle and – Operations or methods at the bottom
  • 6. Notations - Members Visibility • To specify the visibility of a class member (i.e. any attribute or method), – These notations must be placed before the member's name + Public - Private # Protected / Derived (can be combined with one of the others) ~ Package
  • 7. Relationships • A relationship covers the specific types of logical connections found on class and object diagrams. • UML shows the following relationships:
  • 8. Dependency – Connection b/w dependent and independent model elements – Dependency is represented by a dotted arrow – Arrow head represents the independent element and the other end the dependent element.
  • 9. Association • Represent the relationship b/w two elements of a system – Describes how the elements in an UML diagram are associated – Represented by a dotted line with (without) arrows on both sides – Multiplicity is mentioned at the ends
  • 10. Multiplicity in UML • Multiplicity allows to specify cardinality i.e. number of elements - of some collection of elements. • Multiplicity interval has some lower bound and upper bound • Some typical examples of multiplicity Multiplicity Option Cardinality 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 5..5 5 Exactly 5 instances m..n At least m but no more than n instances
  • 11. Example Two or more Player actors are required to initiate Play Game use case. Multiplicity of Players for Soccer Team class
  • 12. Aggregation • Aggregation is a special case of association. • When an object ‘has-a’ another object, – Then you have got an aggregation between them. • Direction specifies which object contains the other object. • Aggregation is also called a “Has-a” relationship Example: A Library contains students and books. Relationship b/w library and student is aggregation.
  • 13. Composition • Composition is a special case of aggregation. • When an object contains the other object, – If the contained object cannot exist without the existence of container object, then it is called composition. Folder could contain many files, while each File has exactly one Folder parent. If Folder is deleted, all contained Files are deleted as well. Hospital has 1 or more Departments, Each Department belongs to exactly one Hospital. If Hospital is closed, so are all of its Departments. Example: A Library contains students and books. Relationship between library and book is composition. A student can exist without a library and therefore it is aggregation. A book cannot exist without a library and therefore its a composition.
  • 14. Generalization • Generalization uses a “is-a” relationship • At a very broader level you can understand this as inheritance. Example: Consider there exists a class named Person. A student is a person. A faculty is a person. Here the relationship b/w student & person, similarly faculty & person is generalization. shared target style.separate target style
  • 15. Realization • A realization relationship is a relationship between two model element – One element (client) realizes (implements) the behavior that the other element (supplier) specifies. • In OOP, realization represents the implementation of an interface by a class.