SlideShare ist ein Scribd-Unternehmen logo
1 von 28
UML CLASS DIAGRAM
AND PACKAGES
By Dileep
Collaberos: “We Create Professionals”
AGENDA
 What is a Class Diagram?
 Essential Elements of a UML Class Diagram
 Packages and Class Diagrams
 Analysis Classes Approach
Collaberos:WeCreateProfessionals
WHAT IS A CLASS DIAGRAM?
 The class diagram is the main building block in
object oriented modeling.
 They are being used both for
 general conceptual modeling of the systematics of the
application, and for detailed modeling translating the
models into programming code.
 The classes in a class diagram represent both
 the main objects and or
 interactions in the application and the objects to be
programmed.
Collaberos:WeCreateProfessionals
CLASSES
 In the class diagram these classes are represented with boxes which
contain three parts.
 The upper part holds the name of the class
 The middle part contains the attributes of the class
 The bottom part gives the methods or operations the class can take or
undertake
Collaberos:WeCreateProfessionals
Window
size: Size
visibility: boolean
display()
hide()
Class
Name
Attributes
Operations
Collaberos:WeCreateProfessionals
In the system design of a system, a number of classes are identified and grouped
together in a class diagram which helps to determine the statical relations between
those objects.
With detailed modeling, the classes of the conceptual design are often split in a
number of subclasses.
ESSENTIAL ELEMENTS OF A UML
CLASS DIAGRAM
 Class Diagram
 Class
 Attributes
 Operations
 Relationships
 Associations
 Generalization
 Dependency
 Realization
 Constraint Rules and Notes
Collaberos:WeCreateProfessionals
ASSOCIATIONS
 A semantic relationship between two or more
classes that specifies connections among their
instances.
 A structural relationship, specifying that
objects of one class are connected to objects of a
second (possibly the same) class.
 Example: “An Employee works for a Company”
Collaberos:WeCreateProfessionals
CompanyDepartmentEmployee
ASSOCIATIONS (CONT.)
 An association between two classes indicates that
objects at one end of an association “recognize”
objects at the other end and may send messages
to them.
 This property will help us discover less trivial
associations using interaction diagrams.
Collaberos:WeCreateProfessionals
ASSOCIATIONS (CONT.)
Collaberos:WeCreateProfessionals
StaffMember Student
1..* *instructs
instructor
Association
name
Role
name
Multiplicity
Navigable
(uni-directional)
association
Courses
pre -
requisites
0..3
Reflexive
association
Role
*
ASSOCIATIONS (CONT.)
 Multiplicity
 The number of instances of the class, next to which
the multiplicity expression appears, that are
referenced by a single instance of the class that is at
the other end of the association path.
 Indicates whether or not an association is mandatory.
 Provides a lower and upper bound on the number of
instances.
Collaberos:WeCreateProfessionals
ASSOCIATIONS (CONT.)
 Multiplicity Indicators
Collaberos:WeCreateProfessionals
Exactly one 1
Zero or more (unlimited) * (0..*)
One or more 1..*
Zero or one (optional association) 0..1
Specified range 2..4
Multiple, disjoint ranges 2, 4..6, 8
AGGREGATION
 A special form of association that models a whole-
part relationship between an aggregate (the whole)
and its parts.
 Models a “is a part-part of” relationship.
Collaberos:WeCreateProfessionals
Whole Part
Car Door House
1..*2..*
COMPOSITION
 A strong form of aggregation
 The whole is the sole owner of its part.
 The part object may belong to only one whole
 Multiplicity on the whole side must be zero or one.
 The life time of the part is dependent upon the whole.
 The composite must manage the creation and destruction of
its parts.
Collaberos:WeCreateProfessionals
Circle Point
3..*
1
Polygon
Point
Circle
GENERALIZATION
 Indicates that objects of the specialized class
(subclass) are substitutable for objects of the
generalized class (super-class).
 “is kind of” relationship.
Collaberos:WeCreateProfessionals
Shape
{abstract}
Circle
Super
Class
Sub
Class
An abstract
class
Generalization
relationship
{abstract} is a
tagged value that
indicates that the
class is abstract.
The name of an
abstract class should
be italicized
DEPENDENCY
 Dependency is a weaker form of relationship which indicates
that
 one class depends on another because it uses it at some
point of time.
 Dependency exists if a class is a parameter variable or local
variable of
 a method of another class.
Collaberos: We Create Professionals
REALIZATION
 A realization relationship indicates that one class
implements a behavior specified by another class
(an interface or protocol).
 An interface can be realized by many classes.
 A class may realize many interfaces.
Collaberos:WeCreateProfessionals
LinkedList
<<interface>>
List LinkedList List
CONSTRAINT RULES AND NOTES
 Constraints and notes annotate among
other things associations, attributes,
operations and classes.
 Constraints are semantic restrictions noted
as Boolean expressions.
UML offers many pre-defined constraints.
Collaberos:WeCreateProfessionals
id: long { value > 0 }
Customer
Order
*1
{ total < $50 }
may be
canceled
Constraint Note
TVRS EXAMPLE
Collaberos:WeCreateProfessionals
id : long
name : String
rank : int
Policeman
<<abstract>>
TrafficPoliceman id : long
description : String
TrafficReport
id : long
description : String
Violation
name : String
id : long
Offender
1..* 1
reports of
1..*
issues1 *
occuredAt : Date
UML PACKAGES
 A package is a general purpose grouping
mechanism.
Can be used to group any UML element (e.g. use
case, actors, classes, components and other
packages.
 Commonly used for specifying the logical
distribution of classes.
 A package does not necessarily translate
into a physical sub-system.
Collaberos:WeCreateProfessionals
Name
LOGICAL DISTRIBUTION OF
CLASSES
 Emphasize the logical structure of the system
(High level view)
 Higher level of abstraction over classes.
 Aids in administration and coordination of the
development process.
 Contributes to the scalability of the system.
 Logical distribution of classes is inferred from the
logical architecture of the system.
Collaberos:WeCreateProfessionals
PACKAGES AND CLASS DIAGRAMS
(CONT.)
 Add package information to class diagrams
Collaberos:WeCreateProfessionals
A
DE
F
G
C
B
PACKAGES AND CLASS DIAGRAMS
(CONT.)
 Add package information to class diagrams
Collaberos:WeCreateProfessionals
a.A
b.b.Db.b.E
b.a.F
b.a.G
a.C
a.B
b.a
b.b
ab
ANALYSIS CLASSES
 A technique for finding analysis classes which
uses three different perspectives of the system:
 The boundary between the system and its actors
 The information the system uses
 The control logic of the system
Collaberos:WeCreateProfessionals
BOUNDARY CLASSES Models the interaction between the system’s
surroundings and its inner workings
 User interface classes
 Concentrate on what information is presented to the user
 Don’t concentrate on user interface details
 Example:
 ReportDetailsForm
 ConfirmationDialog
 System / Device interface classes
 Concentrate on what protocols must be defined. Don’t
concentrate on how the protocols are implemented
Collaberos:WeCreateProfessionals
ENTITY CLASSES
 Models the key concepts of the system
 Usually models information that is persistent
 Contains the logic that solves the system problem
 Can be used in multiple behaviors
 Example: Violation, Report, Offender.
Collaberos:WeCreateProfessionals
CONTROL CLASSES Controls and coordinates the behavior of the
system
 Delegates the work to other classes
 A control class should tell other classes to do something
and should never do anything except for directing
 Control classes decouple boundary and entity
classes
 Example:
 EditReportController
 AddViolationController
Collaberos:WeCreateProfessionals
TVRS EXAMPLE
Collaberos:WeCreateProfessionals
Violation
EditReportController
<<control>>
TrafficReport
Offender TrafficPoliceman
Clerk
ReportDetailsForm
<<boundary>>
ConfirmationDialog
<<boundary>>
PolicemanDBProxy
<<boundary>>
Of fendersDBProxy
<<boundary>>
OffendersDB
PolicemenDB
1
1 1
1
1
THANK YOU

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Class diagrams
Class diagramsClass diagrams
Class diagrams
 
Class diagram
Class diagramClass diagram
Class diagram
 
Class diagrams
Class diagramsClass diagrams
Class diagrams
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
Package Diagram
Package DiagramPackage Diagram
Package Diagram
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
CS8592-OOAD Lecture Notes Unit-4
CS8592-OOAD Lecture Notes Unit-4CS8592-OOAD Lecture Notes Unit-4
CS8592-OOAD Lecture Notes Unit-4
 
system sequence diagram
system sequence diagramsystem sequence diagram
system sequence diagram
 
UML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptxUML and Software Modeling Tools.pptx
UML and Software Modeling Tools.pptx
 
Slide 5 Class Diagram
Slide 5 Class DiagramSlide 5 Class Diagram
Slide 5 Class Diagram
 
OOAD
OOADOOAD
OOAD
 
Object diagram
Object diagramObject diagram
Object diagram
 
Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
CS8592-OOAD Lecture Notes Unit-2
CS8592-OOAD Lecture Notes Unit-2CS8592-OOAD Lecture Notes Unit-2
CS8592-OOAD Lecture Notes Unit-2
 
Deployment Diagram
Deployment DiagramDeployment Diagram
Deployment Diagram
 
The Ultimate Guide for UML Class Diagrams by Creately
The Ultimate Guide for UML Class Diagrams by CreatelyThe Ultimate Guide for UML Class Diagrams by Creately
The Ultimate Guide for UML Class Diagrams by Creately
 

Andere mochten auch

Andere mochten auch (6)

Interfaces & Packages V2
Interfaces & Packages V2Interfaces & Packages V2
Interfaces & Packages V2
 
Package Diagram
Package DiagramPackage Diagram
Package Diagram
 
Uml tutorial (1) (1)
Uml tutorial (1) (1)Uml tutorial (1) (1)
Uml tutorial (1) (1)
 
uml reference package_diagram
uml reference package_diagramuml reference package_diagram
uml reference package_diagram
 
Lect-4: UML diagrams - Unified Modeling Language - SPM
Lect-4: UML diagrams - Unified Modeling Language - SPMLect-4: UML diagrams - Unified Modeling Language - SPM
Lect-4: UML diagrams - Unified Modeling Language - SPM
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case Diagram
 

Ähnlich wie Uml class diagram and packages ppt for dot net

08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagramskebsterz
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented DesignAravinth NSP
 
UNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxUNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxanguraju1
 
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTCS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTleela rani
 
Uml unified-modeling-language-presented by dileep
Uml unified-modeling-language-presented by dileepUml unified-modeling-language-presented by dileep
Uml unified-modeling-language-presented by dileepmekhap
 
Architecture and design
Architecture and designArchitecture and design
Architecture and designhimanshu_airon
 
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.pdfTARGARYEN001
 
Learn C# Programming - Classes & Inheritance
Learn C# Programming - Classes & InheritanceLearn C# Programming - Classes & Inheritance
Learn C# Programming - Classes & InheritanceEng Teong Cheah
 
Jedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented conceptsJedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented conceptsMaryo Manjaruni
 
Fundamentals of oops in .Net
Fundamentals of oops in .NetFundamentals of oops in .Net
Fundamentals of oops in .NetHarman Bajwa
 

Ähnlich wie Uml class diagram and packages ppt for dot net (20)

Sda 7
Sda   7Sda   7
Sda 7
 
08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagrams
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Software Testing and UML Lab
Software Testing and UML LabSoftware Testing and UML Lab
Software Testing and UML Lab
 
UNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxUNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptx
 
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTCS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
 
Rbce
Rbce Rbce
Rbce
 
2 class use case
2 class use case2 class use case
2 class use case
 
Css uml
Css umlCss uml
Css uml
 
uml2-1214558329929112-8.ppt
uml2-1214558329929112-8.pptuml2-1214558329929112-8.ppt
uml2-1214558329929112-8.ppt
 
OOP_Module 2.pptx
OOP_Module 2.pptxOOP_Module 2.pptx
OOP_Module 2.pptx
 
Uml unified-modeling-language-presented by dileep
Uml unified-modeling-language-presented by dileepUml unified-modeling-language-presented by dileep
Uml unified-modeling-language-presented by dileep
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
Unit 2
Unit 2Unit 2
Unit 2
 
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
 
Learn C# Programming - Classes & Inheritance
Learn C# Programming - Classes & InheritanceLearn C# Programming - Classes & Inheritance
Learn C# Programming - Classes & Inheritance
 
Jedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented conceptsJedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented concepts
 
Fundamentals of oops in .Net
Fundamentals of oops in .NetFundamentals of oops in .Net
Fundamentals of oops in .Net
 
Advance oops concepts
Advance oops conceptsAdvance oops concepts
Advance oops concepts
 

Kürzlich hochgeladen

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 

Kürzlich hochgeladen (20)

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 

Uml class diagram and packages ppt for dot net

  • 1. UML CLASS DIAGRAM AND PACKAGES By Dileep Collaberos: “We Create Professionals”
  • 2. AGENDA  What is a Class Diagram?  Essential Elements of a UML Class Diagram  Packages and Class Diagrams  Analysis Classes Approach Collaberos:WeCreateProfessionals
  • 3. WHAT IS A CLASS DIAGRAM?  The class diagram is the main building block in object oriented modeling.  They are being used both for  general conceptual modeling of the systematics of the application, and for detailed modeling translating the models into programming code.  The classes in a class diagram represent both  the main objects and or  interactions in the application and the objects to be programmed. Collaberos:WeCreateProfessionals
  • 4. CLASSES  In the class diagram these classes are represented with boxes which contain three parts.  The upper part holds the name of the class  The middle part contains the attributes of the class  The bottom part gives the methods or operations the class can take or undertake Collaberos:WeCreateProfessionals Window size: Size visibility: boolean display() hide() Class Name Attributes Operations
  • 5. Collaberos:WeCreateProfessionals In the system design of a system, a number of classes are identified and grouped together in a class diagram which helps to determine the statical relations between those objects. With detailed modeling, the classes of the conceptual design are often split in a number of subclasses.
  • 6. ESSENTIAL ELEMENTS OF A UML CLASS DIAGRAM  Class Diagram  Class  Attributes  Operations  Relationships  Associations  Generalization  Dependency  Realization  Constraint Rules and Notes Collaberos:WeCreateProfessionals
  • 7. ASSOCIATIONS  A semantic relationship between two or more classes that specifies connections among their instances.  A structural relationship, specifying that objects of one class are connected to objects of a second (possibly the same) class.  Example: “An Employee works for a Company” Collaberos:WeCreateProfessionals CompanyDepartmentEmployee
  • 8. ASSOCIATIONS (CONT.)  An association between two classes indicates that objects at one end of an association “recognize” objects at the other end and may send messages to them.  This property will help us discover less trivial associations using interaction diagrams. Collaberos:WeCreateProfessionals
  • 9. ASSOCIATIONS (CONT.) Collaberos:WeCreateProfessionals StaffMember Student 1..* *instructs instructor Association name Role name Multiplicity Navigable (uni-directional) association Courses pre - requisites 0..3 Reflexive association Role *
  • 10. ASSOCIATIONS (CONT.)  Multiplicity  The number of instances of the class, next to which the multiplicity expression appears, that are referenced by a single instance of the class that is at the other end of the association path.  Indicates whether or not an association is mandatory.  Provides a lower and upper bound on the number of instances. Collaberos:WeCreateProfessionals
  • 11. ASSOCIATIONS (CONT.)  Multiplicity Indicators Collaberos:WeCreateProfessionals Exactly one 1 Zero or more (unlimited) * (0..*) One or more 1..* Zero or one (optional association) 0..1 Specified range 2..4 Multiple, disjoint ranges 2, 4..6, 8
  • 12. AGGREGATION  A special form of association that models a whole- part relationship between an aggregate (the whole) and its parts.  Models a “is a part-part of” relationship. Collaberos:WeCreateProfessionals Whole Part Car Door House 1..*2..*
  • 13. COMPOSITION  A strong form of aggregation  The whole is the sole owner of its part.  The part object may belong to only one whole  Multiplicity on the whole side must be zero or one.  The life time of the part is dependent upon the whole.  The composite must manage the creation and destruction of its parts. Collaberos:WeCreateProfessionals Circle Point 3..* 1 Polygon Point Circle
  • 14. GENERALIZATION  Indicates that objects of the specialized class (subclass) are substitutable for objects of the generalized class (super-class).  “is kind of” relationship. Collaberos:WeCreateProfessionals Shape {abstract} Circle Super Class Sub Class An abstract class Generalization relationship {abstract} is a tagged value that indicates that the class is abstract. The name of an abstract class should be italicized
  • 15. DEPENDENCY  Dependency is a weaker form of relationship which indicates that  one class depends on another because it uses it at some point of time.  Dependency exists if a class is a parameter variable or local variable of  a method of another class. Collaberos: We Create Professionals
  • 16. REALIZATION  A realization relationship indicates that one class implements a behavior specified by another class (an interface or protocol).  An interface can be realized by many classes.  A class may realize many interfaces. Collaberos:WeCreateProfessionals LinkedList <<interface>> List LinkedList List
  • 17. CONSTRAINT RULES AND NOTES  Constraints and notes annotate among other things associations, attributes, operations and classes.  Constraints are semantic restrictions noted as Boolean expressions. UML offers many pre-defined constraints. Collaberos:WeCreateProfessionals id: long { value > 0 } Customer Order *1 { total < $50 } may be canceled Constraint Note
  • 18. TVRS EXAMPLE Collaberos:WeCreateProfessionals id : long name : String rank : int Policeman <<abstract>> TrafficPoliceman id : long description : String TrafficReport id : long description : String Violation name : String id : long Offender 1..* 1 reports of 1..* issues1 * occuredAt : Date
  • 19. UML PACKAGES  A package is a general purpose grouping mechanism. Can be used to group any UML element (e.g. use case, actors, classes, components and other packages.  Commonly used for specifying the logical distribution of classes.  A package does not necessarily translate into a physical sub-system. Collaberos:WeCreateProfessionals Name
  • 20. LOGICAL DISTRIBUTION OF CLASSES  Emphasize the logical structure of the system (High level view)  Higher level of abstraction over classes.  Aids in administration and coordination of the development process.  Contributes to the scalability of the system.  Logical distribution of classes is inferred from the logical architecture of the system. Collaberos:WeCreateProfessionals
  • 21. PACKAGES AND CLASS DIAGRAMS (CONT.)  Add package information to class diagrams Collaberos:WeCreateProfessionals A DE F G C B
  • 22. PACKAGES AND CLASS DIAGRAMS (CONT.)  Add package information to class diagrams Collaberos:WeCreateProfessionals a.A b.b.Db.b.E b.a.F b.a.G a.C a.B b.a b.b ab
  • 23. ANALYSIS CLASSES  A technique for finding analysis classes which uses three different perspectives of the system:  The boundary between the system and its actors  The information the system uses  The control logic of the system Collaberos:WeCreateProfessionals
  • 24. BOUNDARY CLASSES Models the interaction between the system’s surroundings and its inner workings  User interface classes  Concentrate on what information is presented to the user  Don’t concentrate on user interface details  Example:  ReportDetailsForm  ConfirmationDialog  System / Device interface classes  Concentrate on what protocols must be defined. Don’t concentrate on how the protocols are implemented Collaberos:WeCreateProfessionals
  • 25. ENTITY CLASSES  Models the key concepts of the system  Usually models information that is persistent  Contains the logic that solves the system problem  Can be used in multiple behaviors  Example: Violation, Report, Offender. Collaberos:WeCreateProfessionals
  • 26. CONTROL CLASSES Controls and coordinates the behavior of the system  Delegates the work to other classes  A control class should tell other classes to do something and should never do anything except for directing  Control classes decouple boundary and entity classes  Example:  EditReportController  AddViolationController Collaberos:WeCreateProfessionals