SlideShare a Scribd company logo
Class Diagram & Object Diagram
ATA.USAMA
AMP/IT/2015/F/0018
What is a Class Diagram?
 A Class Diagram is a diagram describing the structure
of a system.
 It consists the :
 Classes.
 Attributes.
 Operations.
 Relationships among the classes.
Classes
 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 , designated compartments.
ClassName
attributes
operations
Class Names
 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.
ClassName
attributes
operations
Class Attributes
should include all fields of the object.
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.
Example;
 a Person’s age can be computed from his birth date.
/ age : Date
Person
name : String
address : Address
birthdate : Date
/ age : Date
ssn : Id
Class Attributes (Cont..)
 Attributes can be:
 + public.
 # protected.
 - private.
 / derived.
Person
+ name : String
# address : Address
# birthdate : Date
/ age : Date
- ssn : Id
Class Operations
 Operations describe the class behavior and appear in
the third compartment.
Person
name : String
address : Address
birthdate : Date
ssn : Id
eat
sleep
work
play
Relationships
There are three types of relationships you can
set up between classes.
Dependencies
Generalizations
Associations
Dependency Relationships
 A dependency indicates a semantic relationship
between two or more elements.
 Symbolized by dotted line.
Generalization Relationships
 A generalization connects a subclass to its superclass.
 Generalization provides the capability to create
supper classes that encapsulate structure and behavior
common to several classes.
 specialization provides the ability to create subclasses
that represent refinement to the supper-class.t.
Example :
Association Relationships
 If two classes in a model need to communicate with each
other, there must be link between them.
Here , an association is instructs
Instructor Student
instructs
Association Relationships(Cont..)
 We can indicate the multiplicity of an association by
adding multiplicity adornments to the line denoting the
association.
The example indicates that a Student has one or more
Instructors:
Student Instructor
1..*
Thank You
Kingsoft Office
published by www.Kingsoftstore.com
@Kingsoft_Office
kingsoftstore
Ad

More Related Content

Similar to class Diagram.ppt (20)

Unified Modeling Language and Examples .pptx
Unified Modeling Language and Examples .pptxUnified Modeling Language and Examples .pptx
Unified Modeling Language and Examples .pptx
abinaya707644
 
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
TARGARYEN001
 
Chapter3
Chapter3Chapter3
Chapter3
Dang Tuan
 
Css uml
Css umlCss uml
Css uml
suman Aggarwal
 
Relations Class Diagram
Relations Class DiagramRelations Class Diagram
Relations Class Diagram
halwal
 
Unified Modelling Language Class Diagram.pptx
Unified Modelling Language Class Diagram.pptxUnified Modelling Language Class Diagram.pptx
Unified Modelling Language Class Diagram.pptx
jospinjj
 
Uml report
Uml reportUml report
Uml report
Franco Valdez
 
CHAP1 - OBJECT ORIENTED PROGRAMMING.pptx
CHAP1 - OBJECT ORIENTED PROGRAMMING.pptxCHAP1 - OBJECT ORIENTED PROGRAMMING.pptx
CHAP1 - OBJECT ORIENTED PROGRAMMING.pptx
0wenraiwenbal01
 
08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagrams
kebsterz
 
07. Class Diagram.ppt
07. Class Diagram.ppt07. Class Diagram.ppt
07. Class Diagram.ppt
RandomFunclips
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
Raj Thilak S
 
Class diagram
Class diagramClass diagram
Class diagram
Praneeth Yadav
 
Sree Dattha Institute of Engineering and Science
Sree Dattha Institute of Engineering and ScienceSree Dattha Institute of Engineering and Science
Sree Dattha Institute of Engineering and Science
drprkr74
 
Jar chapter 2
Jar chapter 2Jar chapter 2
Jar chapter 2
Reham Maher El-Safarini
 
Different Types Diagrams
Different Types Diagrams  Different Types Diagrams
Different Types Diagrams
ShauryaGupta38
 
Object Oriented Relationships
Object Oriented RelationshipsObject Oriented Relationships
Object Oriented Relationships
Taher Barodawala
 
Umldiagram
UmldiagramUmldiagram
Umldiagram
pavandeep11
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
Aravinth NSP
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
Sudarsun Santhiappan
 
C# program structure
C# program structureC# program structure
C# program structure
baabtra.com - No. 1 supplier of quality freshers
 
Unified Modeling Language and Examples .pptx
Unified Modeling Language and Examples .pptxUnified Modeling Language and Examples .pptx
Unified Modeling Language and Examples .pptx
abinaya707644
 
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
TARGARYEN001
 
Relations Class Diagram
Relations Class DiagramRelations Class Diagram
Relations Class Diagram
halwal
 
Unified Modelling Language Class Diagram.pptx
Unified Modelling Language Class Diagram.pptxUnified Modelling Language Class Diagram.pptx
Unified Modelling Language Class Diagram.pptx
jospinjj
 
CHAP1 - OBJECT ORIENTED PROGRAMMING.pptx
CHAP1 - OBJECT ORIENTED PROGRAMMING.pptxCHAP1 - OBJECT ORIENTED PROGRAMMING.pptx
CHAP1 - OBJECT ORIENTED PROGRAMMING.pptx
0wenraiwenbal01
 
08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagrams
kebsterz
 
Sree Dattha Institute of Engineering and Science
Sree Dattha Institute of Engineering and ScienceSree Dattha Institute of Engineering and Science
Sree Dattha Institute of Engineering and Science
drprkr74
 
Different Types Diagrams
Different Types Diagrams  Different Types Diagrams
Different Types Diagrams
ShauryaGupta38
 
Object Oriented Relationships
Object Oriented RelationshipsObject Oriented Relationships
Object Oriented Relationships
Taher Barodawala
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
Aravinth NSP
 

Recently uploaded (20)

Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRYLEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
LEARN SEO AND INCREASE YOUR KNOWLDGE IN SOFTWARE INDUSTRY
NidaFarooq10
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Ad

class Diagram.ppt

  • 1. Class Diagram & Object Diagram ATA.USAMA AMP/IT/2015/F/0018
  • 2. What is a Class Diagram?  A Class Diagram is a diagram describing the structure of a system.  It consists the :  Classes.  Attributes.  Operations.  Relationships among the classes.
  • 3. Classes  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 , designated compartments. ClassName attributes operations
  • 4. Class Names  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. ClassName attributes operations
  • 5. Class Attributes should include all fields of the object. 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. Example;  a Person’s age can be computed from his birth date. / age : Date Person name : String address : Address birthdate : Date / age : Date ssn : Id
  • 6. Class Attributes (Cont..)  Attributes can be:  + public.  # protected.  - private.  / derived. Person + name : String # address : Address # birthdate : Date / age : Date - ssn : Id
  • 7. Class Operations  Operations describe the class behavior and appear in the third compartment. Person name : String address : Address birthdate : Date ssn : Id eat sleep work play
  • 8. Relationships There are three types of relationships you can set up between classes. Dependencies Generalizations Associations
  • 9. Dependency Relationships  A dependency indicates a semantic relationship between two or more elements.  Symbolized by dotted line.
  • 10. Generalization Relationships  A generalization connects a subclass to its superclass.  Generalization provides the capability to create supper classes that encapsulate structure and behavior common to several classes.  specialization provides the ability to create subclasses that represent refinement to the supper-class.t.
  • 12. Association Relationships  If two classes in a model need to communicate with each other, there must be link between them. Here , an association is instructs Instructor Student instructs
  • 13. Association Relationships(Cont..)  We can indicate the multiplicity of an association by adding multiplicity adornments to the line denoting the association. The example indicates that a Student has one or more Instructors: Student Instructor 1..*
  • 14. Thank You Kingsoft Office published by www.Kingsoftstore.com @Kingsoft_Office kingsoftstore