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

Class diagram presentation

  • 1.
    Start with theName of ALLAH(j) Who is most Gracious and Merciful
  • 2.
    Name: Sayed FarhanAli Shah Roll No: 39 Subject: Introduction to Software Development Department: I.T Computer Science Institute: Shah Adbul Latif University Khairpur Sindh Pakistan
  • 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 representedwith boxes which contain three parts: Name Attributes Operations
  • 6.
    NAME The toppart 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 usedto 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 ofClass Account_Name - Customer Name - Balance +add Funds( ) +with Draw( ) +transfer( ) Name Attributes Operations
  • 9.
    There are twokinds of Relationships  Generalization (parent-child relationship)  Association (student enrolls in course) Associations can be further classified as  Aggregation  Composition
  • 10.
    Generalization  Generalizationexpresses a parent/child relationship among related classes.  Used for abstracting details in several layers Super type Subtype1 Subtype2 Example
  • 11.
    Association Associations representrelationships 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
  • 16.