SlideShare a Scribd company logo
2
Most read
4
Most read
14
Most read
Duration : 3 hrs
1
Ramakant Soni
Assistant Professor
Dept. of Computer Science
B K Birla Institute of Engineering & Technology, Pilani, India
Ramakant Soni @ BKBIET PIlani
Class Diagram Overview
Class diagram is one type of UML structure diagram
which shows structure of the designed system at the
level of classes and interfaces, shows their features,
constraints and their relationships - associations,
generalizations, dependencies, etc.
Ramakant Soni @ BKBIET PIlani 2
ClassName
attributes
A class is a description of a set of objects
that share the same attributes, operations,
relationships, and semantics.
Graphically, a class is rendered as a
rectangle, usually including its name,
attributes, and operations in separate,
operations
attributes, and operations in separate,
designated compartments.
Ramakant Soni @ BKBIET PIlani
ClassName
attributes
The name of the class is the only required tag in
the graphical representation of a class. It
always appears in the top-most compartment.
operations
Ramakant Soni @ BKBIET PIlani
Person
name : String
address : Address
birthdate : Date
An attribute is a named property of a class
that describes the object being modeled.
In the class diagram, attributes appear in thebirthdate : Date
ssn : Id
In the class diagram, attributes appear in the
second compartment just below the name-
compartment.
Ramakant Soni @ BKBIET PIlani
Person
name : String
address : Address
Attributes are usually listed in the form:
attributeName : Type
A derived attribute is one that can be
computed from other attributes, but doesn’t
actually exist.
address : Address
birthdate : Date
/ age : Date
ssn : Id
For example, a Person’s age can be
computed from his birth date. A derived
attribute is designated by a preceding ‘/’ as
in:
/ age : Date
Ramakant Soni @ BKBIET PIlani
Person
+ name : String
# address : Address
Attributes can be:
+ public
# protected
- private
# address : Address
# birthdate : Date
/ age : Date
- ssn : Id
- private
/ derived
Ramakant Soni @ BKBIET PIlani
Person
name : String
address : Address
birthdate : Datebirthdate : Date
ssn : Id
Eat()
Sleep()
Work()
Play()
Operations describe the class behavior
and appear in the third compartment.
Ramakant Soni @ BKBIET PIlani
A class may also include its responsibilities in a class diagram.
A responsibility is a contract or obligation of a class to perform a
particular service.
SmokeAlarm
Responsibilities
-- sound alert and notify guard station
when smoke is detected.
-- indicate battery state
Ramakant Soni @ BKBIET PIlani
In UML, object interconnections (logical or physical), are modeled as
relationships.
There are five kinds of relationships in UML:
• dependencies
• generalizations
• associations
•Inheritence
•realization
Ramakant Soni @ BKBIET PIlani
A dependency indicates a semantic relationship between two or
more elements. The dependency from CourseSchedule to Course
exists because Course is used in both the add and remove operations
of CourseSchedule.
CourseSchedule
add(c : Course)
remove(c : Course)
Course
Ramakant Soni @ BKBIET PIlani
Person
A generalization connects a subclass to its
super class.
It denotes an inheritance of attributes and
behavior from the super class to thebehavior from the super class to the
subclass and indicates a specialization in
the subclass of the more general super
class.
Student
Ramakant Soni @ BKBIET PIlani
Student
UML permits a class to inherit from multiple superclasses, although some
programming languages (e.g., Java) do not permit multiple
inheritance.
Employee
TeachingAssistant
Ramakant Soni @ BKBIET PIlani
If two classes in a model need to communicate with each other, there
must be link between them.
An association denotes that link.
InstructorStudent
Ramakant Soni @ BKBIET PIlani

More Related Content

What's hot (20)

PDF
Object oriented software engineering concepts
Komal Singh
 
PPT
State Machine Diagram
Niloy Rocker
 
PPT
Uml - An Overview
Raj Thilak S
 
PPTX
Cloud Computing Principles and Paradigms: 11 t-systems cloud-based solutions ...
Majid Hajibaba
 
PPTX
Class Diagram
Rana_brothers
 
PPTX
Documenting software architecture
Himanshu
 
PDF
Domain Modeling
Harsh Jegadeesan
 
PPTX
Distributed dbms architectures
Pooja Dixit
 
PDF
Ooad
Hari Aryal
 
PPT
Uml class diagram and packages ppt for dot net
mekhap
 
PPTX
Overview of UML Diagrams
Manish Kumar
 
PPT
System Models in Software Engineering SE7
koolkampus
 
PPTX
Semi join
Alokeparna Choudhury
 
PPT
Use case Diagram and Sequence Diagram
Nikhil Pandit
 
PPT
Unit 4 designing classes
gopal10scs185
 
DOCX
Uml Common Mechanism
Satyamevjayte Haxor
 
PPTX
Object oriented methodologies
naina-rani
 
PPT
Uml
Sulman Ahmed
 
PDF
OOAD
yndaravind
 
PPT
Use Case Diagram
Kumar
 
Object oriented software engineering concepts
Komal Singh
 
State Machine Diagram
Niloy Rocker
 
Uml - An Overview
Raj Thilak S
 
Cloud Computing Principles and Paradigms: 11 t-systems cloud-based solutions ...
Majid Hajibaba
 
Class Diagram
Rana_brothers
 
Documenting software architecture
Himanshu
 
Domain Modeling
Harsh Jegadeesan
 
Distributed dbms architectures
Pooja Dixit
 
Uml class diagram and packages ppt for dot net
mekhap
 
Overview of UML Diagrams
Manish Kumar
 
System Models in Software Engineering SE7
koolkampus
 
Use case Diagram and Sequence Diagram
Nikhil Pandit
 
Unit 4 designing classes
gopal10scs185
 
Uml Common Mechanism
Satyamevjayte Haxor
 
Object oriented methodologies
naina-rani
 
Use Case Diagram
Kumar
 

Viewers also liked (20)

PPT
Uml class Diagram
Satyamevjayte Haxor
 
PDF
What is Algorithm - An Overview
Ramakant Soni
 
PDF
UML basic - Class Diagram
Yeti Sno
 
PDF
Use Case diagram-UML diagram-2
Ramakant Soni
 
PDF
Use Case diagram-UML diagram-1
Ramakant Soni
 
PPTX
class diagram
Shohan Ean
 
PDF
Activity diagram-UML diagram
Ramakant Soni
 
PDF
Sequence diagram- UML diagram
Ramakant Soni
 
PDF
Collaboration diagram- UML diagram
Ramakant Soni
 
PPT
Class diagrams
Vince Carter
 
PPT
UML- Unified Modeling Language
Shahzad
 
PPT
Uml diagrams
barney92
 
PDF
ASE03.ppt
Ptidej Team
 
PPTX
Confidentiality, security, and integrity of information
smallwoods
 
DOC
Inner classnotation in uml class diagram
IIUM
 
PDF
Ermodeling
Supriya Chakraborty
 
DOCX
Use case specification dan activity diagram [INTERNAL EDUCATIONAL PURPOSED]
Theo Pratama
 
PDF
Safeguarding Confidentiality and Maintaining Security in Commissioning Health...
Alex Beisser MBCS
 
PPT
Slide 5 Class Diagram
Niloy Rocker
 
PDF
Chapter 2
IIUM
 
Uml class Diagram
Satyamevjayte Haxor
 
What is Algorithm - An Overview
Ramakant Soni
 
UML basic - Class Diagram
Yeti Sno
 
Use Case diagram-UML diagram-2
Ramakant Soni
 
Use Case diagram-UML diagram-1
Ramakant Soni
 
class diagram
Shohan Ean
 
Activity diagram-UML diagram
Ramakant Soni
 
Sequence diagram- UML diagram
Ramakant Soni
 
Collaboration diagram- UML diagram
Ramakant Soni
 
Class diagrams
Vince Carter
 
UML- Unified Modeling Language
Shahzad
 
Uml diagrams
barney92
 
ASE03.ppt
Ptidej Team
 
Confidentiality, security, and integrity of information
smallwoods
 
Inner classnotation in uml class diagram
IIUM
 
Use case specification dan activity diagram [INTERNAL EDUCATIONAL PURPOSED]
Theo Pratama
 
Safeguarding Confidentiality and Maintaining Security in Commissioning Health...
Alex Beisser MBCS
 
Slide 5 Class Diagram
Niloy Rocker
 
Chapter 2
IIUM
 
Ad

Similar to Class diagram- UML diagram (20)

PPT
UML Diagrams: Class Diagrams in Software Engineering
NabeelRehman21
 
PPT
Class diagrams
Nadia_Nazeer
 
PPT
Descriptions of class diagrams in software
ssuser9d62d6
 
PDF
Introduction to UML, a guide to learn.pdf
TARGARYEN001
 
PPT
class Diagram.ppt
usama537223
 
PPT
Lecture12 software design class diagram
Shahid Riaz
 
PPTX
210280107093_CLASS_DIAGRAM.pptx
HimeshNayi
 
DOCX
Chapterunifiedmo 3 UML Class Diagram.docx
MohammedNouh7
 
PDF
Software Engineering :UML class diagrams
Ajit Nayak
 
PPTX
CLASS DIAGRAMS IN OBJECT ORIENTED ANALYSIS AND DESIGN
UmmuAhmed3
 
PDF
Class diagram and its importance in software
nazimsattar
 
PPTX
UML Class Diagram G-3-122139
Hansi Thenuwara
 
PDF
Lesson #04 - Software Engineering - Practice.pdf
BeksultanMustafin
 
PDF
Ooad( class diagram)
RimshaLiaqat5
 
PPTX
UML Design.pptx
Md. Nazmus Saqib Khan
 
PPT
Week 10-classdiagrams.pptdddddddddddddddddddddddddddd
v67904413
 
PPT
Chapter 2-Unified Modeling Languagee.ppt
SisayNegash4
 
PPT
Chapter 2-Unified Modeling Languagee.ppt
SisayNegash4
 
PDF
Lecture 4-oop class diagram
ktuonlinenotes
 
UML Diagrams: Class Diagrams in Software Engineering
NabeelRehman21
 
Class diagrams
Nadia_Nazeer
 
Descriptions of class diagrams in software
ssuser9d62d6
 
Introduction to UML, a guide to learn.pdf
TARGARYEN001
 
class Diagram.ppt
usama537223
 
Lecture12 software design class diagram
Shahid Riaz
 
210280107093_CLASS_DIAGRAM.pptx
HimeshNayi
 
Chapterunifiedmo 3 UML Class Diagram.docx
MohammedNouh7
 
Software Engineering :UML class diagrams
Ajit Nayak
 
CLASS DIAGRAMS IN OBJECT ORIENTED ANALYSIS AND DESIGN
UmmuAhmed3
 
Class diagram and its importance in software
nazimsattar
 
UML Class Diagram G-3-122139
Hansi Thenuwara
 
Lesson #04 - Software Engineering - Practice.pdf
BeksultanMustafin
 
Ooad( class diagram)
RimshaLiaqat5
 
UML Design.pptx
Md. Nazmus Saqib Khan
 
Week 10-classdiagrams.pptdddddddddddddddddddddddddddd
v67904413
 
Chapter 2-Unified Modeling Languagee.ppt
SisayNegash4
 
Chapter 2-Unified Modeling Languagee.ppt
SisayNegash4
 
Lecture 4-oop class diagram
ktuonlinenotes
 
Ad

More from Ramakant Soni (7)

PDF
GATE 2021 Exam Information
Ramakant Soni
 
PDF
Role of Data Cleaning in Data Warehouse
Ramakant Soni
 
PDF
Internet of things
Ramakant Soni
 
PDF
NOSQL- Presentation on NoSQL
Ramakant Soni
 
PDF
Huffman and Arithmetic coding - Performance analysis
Ramakant Soni
 
PDF
UML daigrams for Bank ATM system
Ramakant Soni
 
PDF
UML Diagrams- Unified Modeling Language Introduction
Ramakant Soni
 
GATE 2021 Exam Information
Ramakant Soni
 
Role of Data Cleaning in Data Warehouse
Ramakant Soni
 
Internet of things
Ramakant Soni
 
NOSQL- Presentation on NoSQL
Ramakant Soni
 
Huffman and Arithmetic coding - Performance analysis
Ramakant Soni
 
UML daigrams for Bank ATM system
Ramakant Soni
 
UML Diagrams- Unified Modeling Language Introduction
Ramakant Soni
 

Recently uploaded (20)

PPTX
Green Building & Energy Conservation ppt
Sagar Sarangi
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PDF
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
PPTX
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPTX
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
PPTX
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PPTX
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PPTX
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
PPTX
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
Green Building & Energy Conservation ppt
Sagar Sarangi
 
MRRS Strength and Durability of Concrete
CivilMythili
 
Design Thinking basics for Engineers.pdf
CMR University
 
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
Thermal runway and thermal stability.pptx
godow93766
 
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 

Class diagram- UML diagram

  • 1. Duration : 3 hrs 1 Ramakant Soni Assistant Professor Dept. of Computer Science B K Birla Institute of Engineering & Technology, Pilani, India Ramakant Soni @ BKBIET PIlani
  • 2. Class Diagram Overview Class diagram is one type of UML structure diagram which shows structure of the designed system at the level of classes and interfaces, shows their features, constraints and their relationships - associations, generalizations, dependencies, etc. Ramakant Soni @ BKBIET PIlani 2
  • 3. ClassName attributes A class is a description of a set of objects that share the same attributes, operations, relationships, and semantics. Graphically, a class is rendered as a rectangle, usually including its name, attributes, and operations in separate, operations attributes, and operations in separate, designated compartments. Ramakant Soni @ BKBIET PIlani
  • 4. ClassName attributes The name of the class is the only required tag in the graphical representation of a class. It always appears in the top-most compartment. operations Ramakant Soni @ BKBIET PIlani
  • 5. Person name : String address : Address birthdate : Date An attribute is a named property of a class that describes the object being modeled. In the class diagram, attributes appear in thebirthdate : Date ssn : Id In the class diagram, attributes appear in the second compartment just below the name- compartment. Ramakant Soni @ BKBIET PIlani
  • 6. Person name : String address : Address Attributes are usually listed in the form: attributeName : Type A derived attribute is one that can be computed from other attributes, but doesn’t actually exist. address : Address birthdate : Date / age : Date ssn : Id For example, a Person’s age can be computed from his birth date. A derived attribute is designated by a preceding ‘/’ as in: / age : Date Ramakant Soni @ BKBIET PIlani
  • 7. Person + name : String # address : Address Attributes can be: + public # protected - private # address : Address # birthdate : Date / age : Date - ssn : Id - private / derived Ramakant Soni @ BKBIET PIlani
  • 8. Person name : String address : Address birthdate : Datebirthdate : Date ssn : Id Eat() Sleep() Work() Play() Operations describe the class behavior and appear in the third compartment. Ramakant Soni @ BKBIET PIlani
  • 9. A class may also include its responsibilities in a class diagram. A responsibility is a contract or obligation of a class to perform a particular service. SmokeAlarm Responsibilities -- sound alert and notify guard station when smoke is detected. -- indicate battery state Ramakant Soni @ BKBIET PIlani
  • 10. In UML, object interconnections (logical or physical), are modeled as relationships. There are five kinds of relationships in UML: • dependencies • generalizations • associations •Inheritence •realization Ramakant Soni @ BKBIET PIlani
  • 11. A dependency indicates a semantic relationship between two or more elements. The dependency from CourseSchedule to Course exists because Course is used in both the add and remove operations of CourseSchedule. CourseSchedule add(c : Course) remove(c : Course) Course Ramakant Soni @ BKBIET PIlani
  • 12. Person A generalization connects a subclass to its super class. It denotes an inheritance of attributes and behavior from the super class to thebehavior from the super class to the subclass and indicates a specialization in the subclass of the more general super class. Student Ramakant Soni @ BKBIET PIlani
  • 13. Student UML permits a class to inherit from multiple superclasses, although some programming languages (e.g., Java) do not permit multiple inheritance. Employee TeachingAssistant Ramakant Soni @ BKBIET PIlani
  • 14. If two classes in a model need to communicate with each other, there must be link between them. An association denotes that link. InstructorStudent Ramakant Soni @ BKBIET PIlani