SlideShare a Scribd company logo
Start with the Name of 
ALLAH(j) 
Who is most Gracious and Merciful
Name: Sayed Farhan Ali Shah 
Roll No: 39 
Subject: Introduction to Software Development 
Department: I.T Computer Science 
Institute: Shah Adbul Latif University Khairpur Sindh 
Pakistan
Class Diagram 
 Used for describing structure and behavior 
in the use cases 
 Provide a conceptual model of the system in 
terms of entities and their relationships
Class is represented with boxes 
which contain three parts: 
Name 
Attributes 
Operations
NAME 
The top part contains the name of the class. It is 
printed in Bold, centered and the first letter 
capitalized. 
ATTRIBUTES 
The middle part contains the attributes of the class. 
They are left aligned and the first letter is lower case. 
OPERATIONS 
The bottom part gives the methods or operations the 
class can take or undertake. They are also left 
aligned and the first letter is lower case.
Modifiers are used to indicate 
visibility of attributes and operations. 
‘+’ is used to denote Public visibility (everyone) 
‘#’ is used to denote Protected visibility (friends and 
derived) 
‘-’ is used to denote Private visibility (no one) 
 By default, attributes are hidden and operations 
are visible. 
 The last two compartments may be omitted to 
simplify the class diagrams
An example of Class 
Account_Name 
- Customer Name 
- Balance 
+add Funds( ) 
+with Draw( ) 
+transfer( ) 
Name 
Attributes 
Operations
There are two kinds of Relationships 
 Generalization (parent-child relationship) 
 Association (student enrolls in course) 
Associations can be further classified as 
 Aggregation 
 Composition
Generalization 
 Generalization expresses a parent/child 
relationship among related classes. 
 Used for abstracting details in several layers 
Super type 
Subtype1 Subtype2 
Example
Association 
Associations represent relationships between instances 
of classes . 
An association is a link connecting two classes. 
Bi-directional association 
Associations are assumed to be bi-directional 
e.g. Flight and plane 
notation: 
Uni-directional association 
e.g. Order and item 
notation:
Composition 
 Composition: expresses a relationship among 
instances 
of related classes. It is a specific kind of Whole-Part 
relationship 
 It expresses a relationship where an instance of the 
Whole-class has the responsibility to create and initialize 
instances of each Part-class.
1 2 
Automobile 
Engine Transmission 
Example of Composition 
Person 
Legs Hands
Aggregation 
 Aggregation: expresses a relationship among 
instances of related classes. It is a specific kind of 
Container Containee relationship. 
 It expresses a relationship where an instance of the 
Container-class has the responsibility to hold and 
maintain instances of each Containee-class that have 
been created 
outside the auspices of the Container-class.
Example of Aggregation 
Bag 
Books Apples
Thank 
You

More Related Content

What's hot

Domain Modeling
Domain ModelingDomain Modeling
Domain Modeling
Harsh Jegadeesan
 
Class diagram
Class diagramClass diagram
Class diagram
Praneeth Yadav
 
Unit 2(advanced class modeling & state diagram)
Unit  2(advanced class modeling & state diagram)Unit  2(advanced class modeling & state diagram)
Unit 2(advanced class modeling & state diagram)
Manoj Reddy
 
Object diagram
Object diagramObject diagram
Object diagram
Rahul Pola
 
Presentation on uml
Presentation on umlPresentation on uml
Presentation on uml
Shruti Dalela
 
Grasp
GraspGrasp
UML Class Diagram Notation
UML Class Diagram NotationUML Class Diagram Notation
UML Class Diagram Notation
adnan12345678
 
Use case Diagram
Use case Diagram Use case Diagram
Use case Diagram
Rahul Pola
 
Uml Common Mechanism
Uml Common MechanismUml Common Mechanism
Uml Common Mechanism
Satyamevjayte Haxor
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
AMITJain879
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
Manish Kumar
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT I
pkaviya
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentationmewaseem
 
Uml Activity Diagram
Uml Activity DiagramUml Activity Diagram
Uml Activity DiagramNiloy Rocker
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignHaitham El-Ghareeb
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
barney92
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
Kartik Raghuvanshi
 
UML
UMLUML
Uml
UmlUml
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
Kaushik Ghosh
 

What's hot (20)

Domain Modeling
Domain ModelingDomain Modeling
Domain Modeling
 
Class diagram
Class diagramClass diagram
Class diagram
 
Unit 2(advanced class modeling & state diagram)
Unit  2(advanced class modeling & state diagram)Unit  2(advanced class modeling & state diagram)
Unit 2(advanced class modeling & state diagram)
 
Object diagram
Object diagramObject diagram
Object diagram
 
Presentation on uml
Presentation on umlPresentation on uml
Presentation on uml
 
Grasp
GraspGrasp
Grasp
 
UML Class Diagram Notation
UML Class Diagram NotationUML Class Diagram Notation
UML Class Diagram Notation
 
Use case Diagram
Use case Diagram Use case Diagram
Use case Diagram
 
Uml Common Mechanism
Uml Common MechanismUml Common Mechanism
Uml Common Mechanism
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT I
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
Uml Activity Diagram
Uml Activity DiagramUml Activity Diagram
Uml Activity Diagram
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
UML
UMLUML
UML
 
Uml
UmlUml
Uml
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
 

Similar to Class diagram presentation

Lecture12 software design class diagram
Lecture12 software design class diagramLecture12 software design class diagram
Lecture12 software design class diagram
Shahid Riaz
 
class Diagram.ppt
class Diagram.pptclass Diagram.ppt
class Diagram.ppt
usama537223
 
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
 
Css uml
Css umlCss uml
2 class use case
2 class use case2 class use case
2 class use case
Minal Maniar
 
Descriptions of class diagrams in software
Descriptions of class diagrams in softwareDescriptions of class diagrams in software
Descriptions of class diagrams in software
ssuser9d62d6
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
Raj Thilak S
 
08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagramskebsterz
 
210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx
HimeshNayi
 
Relations Class Diagram
Relations Class DiagramRelations Class Diagram
Relations Class Diagram
halwal
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
Sudarsun Santhiappan
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented DesignAravinth NSP
 
UML, ER and Dimensional Modelling
UML, ER and Dimensional ModellingUML, ER and Dimensional Modelling
UML, ER and Dimensional Modelling
Stefano Dalla Palma
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling Language
Shahzad
 
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejnejeUML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
ssusera6a60c1
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
Madhar Khan Pathan
 
07. Class Diagram.ppt
07. Class Diagram.ppt07. Class Diagram.ppt
07. Class Diagram.ppt
RandomFunclips
 
Class Diagram | OOP and Design Patterns by Oum Saokosal
Class Diagram | OOP and Design Patterns by Oum SaokosalClass Diagram | OOP and Design Patterns by Oum Saokosal
Class Diagram | OOP and Design Patterns by Oum Saokosal
OUM SAOKOSAL
 

Similar to Class diagram presentation (20)

Chapter3
Chapter3Chapter3
Chapter3
 
Lecture12 software design class diagram
Lecture12 software design class diagramLecture12 software design class diagram
Lecture12 software design class diagram
 
class Diagram.ppt
class Diagram.pptclass Diagram.ppt
class Diagram.ppt
 
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
 
Css uml
Css umlCss uml
Css uml
 
2 class use case
2 class use case2 class use case
2 class use case
 
Descriptions of class diagrams in software
Descriptions of class diagrams in softwareDescriptions of class diagrams in software
Descriptions of class diagrams in software
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Uml report
Uml reportUml report
Uml report
 
08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagrams
 
210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx
 
Relations Class Diagram
Relations Class DiagramRelations Class Diagram
Relations Class Diagram
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
UML, ER and Dimensional Modelling
UML, ER and Dimensional ModellingUML, ER and Dimensional Modelling
UML, ER and Dimensional Modelling
 
UML- Unified Modeling Language
UML- Unified Modeling LanguageUML- Unified Modeling Language
UML- Unified Modeling Language
 
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejnejeUML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
07. Class Diagram.ppt
07. Class Diagram.ppt07. Class Diagram.ppt
07. Class Diagram.ppt
 
Class Diagram | OOP and Design Patterns by Oum Saokosal
Class Diagram | OOP and Design Patterns by Oum SaokosalClass Diagram | OOP and Design Patterns by Oum Saokosal
Class Diagram | OOP and Design Patterns by Oum Saokosal
 

Recently uploaded

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 

Recently uploaded (20)

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 

Class diagram presentation

  • 1. Start with the Name of ALLAH(j) Who is most Gracious and Merciful
  • 2. Name: Sayed Farhan Ali Shah Roll No: 39 Subject: Introduction to Software Development Department: I.T Computer Science Institute: Shah Adbul Latif University Khairpur Sindh Pakistan
  • 3.
  • 4. Class Diagram  Used for describing structure and behavior in the use cases  Provide a conceptual model of the system in terms of entities and their relationships
  • 5. Class is represented with boxes which contain three parts: Name Attributes Operations
  • 6. NAME The top part contains the name of the class. It is printed in Bold, centered and the first letter capitalized. ATTRIBUTES The middle part contains the attributes of the class. They are left aligned and the first letter is lower case. OPERATIONS The bottom part gives the methods or operations the class can take or undertake. They are also left aligned and the first letter is lower case.
  • 7. Modifiers are used to indicate visibility of attributes and operations. ‘+’ is used to denote Public visibility (everyone) ‘#’ is used to denote Protected visibility (friends and derived) ‘-’ is used to denote Private visibility (no one)  By default, attributes are hidden and operations are visible.  The last two compartments may be omitted to simplify the class diagrams
  • 8. An example of Class Account_Name - Customer Name - Balance +add Funds( ) +with Draw( ) +transfer( ) Name Attributes Operations
  • 9. There are two kinds of Relationships  Generalization (parent-child relationship)  Association (student enrolls in course) Associations can be further classified as  Aggregation  Composition
  • 10. Generalization  Generalization expresses a parent/child relationship among related classes.  Used for abstracting details in several layers Super type Subtype1 Subtype2 Example
  • 11. Association Associations represent relationships between instances of classes . An association is a link connecting two classes. Bi-directional association Associations are assumed to be bi-directional e.g. Flight and plane notation: Uni-directional association e.g. Order and item notation:
  • 12. Composition  Composition: expresses a relationship among instances of related classes. It is a specific kind of Whole-Part relationship  It expresses a relationship where an instance of the Whole-class has the responsibility to create and initialize instances of each Part-class.
  • 13. 1 2 Automobile Engine Transmission Example of Composition Person Legs Hands
  • 14. Aggregation  Aggregation: expresses a relationship among instances of related classes. It is a specific kind of Container Containee relationship.  It expresses a relationship where an instance of the Container-class has the responsibility to hold and maintain instances of each Containee-class that have been created outside the auspices of the Container-class.
  • 15. Example of Aggregation Bag Books Apples