Top Banner
Start with the Name of ALLAH(j) Who is most Gracious and Merciful
16
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Class diagram presentation

Start with the Name of ALLAH(j) Who is most Gracious and Merciful

Page 2: Class diagram presentation

Name: Sayed Farhan Ali ShahRoll No: 39Subject: Introduction to Software DevelopmentDepartment: I.T Computer Science Institute: Shah Adbul Latif University Khairpur Sindh Pakistan

Page 3: Class diagram presentation
Page 4: Class diagram presentation

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

Page 5: Class diagram presentation

Class is represented with boxes which contain three parts:NameAttributesOperations

Page 6: Class diagram presentation

NAMEThe top part contains the name of the class. It is printed in Bold, centered and the first letter capitalized.

ATTRIBUTESThe middle part contains the attributes of the class. They are left aligned and the first letter is lower case.

OPERATIONSThe 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.

Page 7: Class diagram presentation

‘+’ is used to denote Public visibility (everyone)

‘#’ is used to denote Protected visibility (friends and derived)

‘-’ is used to denote Private visibility (no one)

Modifiers are used to indicate visibility of attributes and operations.

By default, attributes are hidden and operations are visible.

The last two compartments may be omitted to simplify the class diagrams

Page 8: Class diagram presentation

Account_Name- Customer Name- Balance+add Funds( )+with Draw( )+transfer( )

Name

Attributes

Operations

An example of Class

Page 9: Class diagram presentation

There are two kinds of Relationships Generalization (parent-child relationship) Association (student enrolls in course)

Associations can be further classified as Aggregation Composition

Page 10: Class diagram presentation

Generalization Generalization expresses a parent/child relationship among related classes.

Used for abstracting details in several layers

Super type

Subtype2Subtype1

Example

Page 11: Class diagram presentation

AssociationAssociations represent relationships between instances of classes .

An association is a link connecting two classes.

Bi-directional associationAssociations are assumed to be bi-directional e.g. Flight and plane notation:

Uni-directional associatione.g. Order and item notation:

Page 12: Class diagram presentation

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.

Page 13: Class diagram presentation

Automobile

Engine Transmission

Example of Composition

Person

HandsLegs

1 2

Page 14: Class diagram presentation

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 createdoutside the auspices of the Container-class.

Page 15: Class diagram presentation

Example of Aggregation Bag

BooksApples

Page 16: Class diagram presentation

ThankThank

YouYou