SlideShare a Scribd company logo
2
Most read
4
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

PDF
Enhanced Entity-Relationship (EER) Modeling
PPT
Class diagrams
PPT
Class diagrams
PPTX
Design Concept software engineering
PPTX
Language and Processors for Requirements Specification
PPT
Uml class Diagram
PPTX
Uml deployment diagram
PPTX
Activity diagram
Enhanced Entity-Relationship (EER) Modeling
Class diagrams
Class diagrams
Design Concept software engineering
Language and Processors for Requirements Specification
Uml class Diagram
Uml deployment diagram
Activity diagram

What's hot (20)

PPT
Class diagram presentation
PPT
Unit 3(advanced state modeling & interaction meodelling)
PDF
Sequence diagram- UML diagram
PPTX
Object diagram
PDF
Collaboration diagram- UML diagram
PPTX
unit testing and debugging
PDF
Design patterns
PPT
Unit 1( modelling concepts & class modeling)
PPT
State Diagrams
PPT
Uml diagrams
PPT
Unit 2(advanced class modeling & state diagram)
PDF
Use case diagrams
PPTX
Design concept -Software Engineering
PPT
Slide 5 Class Diagram
PPT
3.2 The design model & Architectural design.ppt
PPTX
Use case diagram
PDF
Requirement analysis and specification
PPT
Component Diagram
PPT
Object Oriented Analysis and Design
PPTX
Design techniques
Class diagram presentation
Unit 3(advanced state modeling & interaction meodelling)
Sequence diagram- UML diagram
Object diagram
Collaboration diagram- UML diagram
unit testing and debugging
Design patterns
Unit 1( modelling concepts & class modeling)
State Diagrams
Uml diagrams
Unit 2(advanced class modeling & state diagram)
Use case diagrams
Design concept -Software Engineering
Slide 5 Class Diagram
3.2 The design model & Architectural design.ppt
Use case diagram
Requirement analysis and specification
Component Diagram
Object Oriented Analysis and Design
Design techniques
Ad

Viewers also liked (18)

PPT
Uml class diagram and packages ppt for dot net
PPT
Uml class-diagram
PDF
What is Algorithm - An Overview
PDF
UML basic - Class Diagram
PDF
Use Case diagram-UML diagram-2
PDF
Use Case diagram-UML diagram-1
PPTX
class diagram
PDF
Activity diagram-UML diagram
PPT
UML- Unified Modeling Language
PDF
ASE03.ppt
PPTX
Confidentiality, security, and integrity of information
DOC
Inner classnotation in uml class diagram
PDF
DOCX
Use case specification dan activity diagram [INTERNAL EDUCATIONAL PURPOSED]
PDF
Safeguarding Confidentiality and Maintaining Security in Commissioning Health...
PDF
Chapter 2
PPT
PDF
UML Diagrams- Unified Modeling Language Introduction
Uml class diagram and packages ppt for dot net
Uml class-diagram
What is Algorithm - An Overview
UML basic - Class Diagram
Use Case diagram-UML diagram-2
Use Case diagram-UML diagram-1
class diagram
Activity diagram-UML diagram
UML- Unified Modeling Language
ASE03.ppt
Confidentiality, security, and integrity of information
Inner classnotation in uml class diagram
Use case specification dan activity diagram [INTERNAL EDUCATIONAL PURPOSED]
Safeguarding Confidentiality and Maintaining Security in Commissioning Health...
Chapter 2
UML Diagrams- Unified Modeling Language Introduction
Ad

Similar to Class diagram- UML diagram (20)

PPTX
210280107093_CLASS_DIAGRAM.pptx
PPT
UML Diagrams: Class Diagrams in Software Engineering
PPTX
Object oriented analysis and design using uml classes and objects
PPT
Descriptions of class diagrams in software
PPT
Chapter 2-Unified Modeling Languagee.ppt
PPT
Chapter 2-Unified Modeling Languagee.ppt
PDF
Introduction to UML, a guide to learn.pdf
PPT
OMD chapter 2 Class modelling
PDF
Software Testing and UML Lab
PPT
class Diagram.ppt
PPT
Lecture12 software design class diagram
PPT
DOCX
Chapterunifiedmo 3 UML Class Diagram.docx
PPTX
Object oriented design using uml
PPT
Object Oriented Modeling and Design with UML
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
PPT
enrity relationship model and diagram .ppt
210280107093_CLASS_DIAGRAM.pptx
UML Diagrams: Class Diagrams in Software Engineering
Object oriented analysis and design using uml classes and objects
Descriptions of class diagrams in software
Chapter 2-Unified Modeling Languagee.ppt
Chapter 2-Unified Modeling Languagee.ppt
Introduction to UML, a guide to learn.pdf
OMD chapter 2 Class modelling
Software Testing and UML Lab
class Diagram.ppt
Lecture12 software design class diagram
Chapterunifiedmo 3 UML Class Diagram.docx
Object oriented design using uml
Object Oriented Modeling and Design with UML
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
enrity relationship model and diagram .ppt

More from Ramakant Soni (6)

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

Recently uploaded (20)

PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
composite construction of structures.pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Welding lecture in detail for understanding
PPTX
web development for engineering and engineering
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
UNIT 4 Total Quality Management .pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Internet of Things (IOT) - A guide to understanding
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
CH1 Production IntroductoryConcepts.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
composite construction of structures.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Welding lecture in detail for understanding
web development for engineering and engineering
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf

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