SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Uml
UmlUml
Uml
 
Class Diagram
Class DiagramClass Diagram
Class Diagram
 
Class diagram
Class diagramClass diagram
Class diagram
 
UML
UMLUML
UML
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
Slide 5 Class Diagram
Slide 5 Class DiagramSlide 5 Class Diagram
Slide 5 Class Diagram
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Presentation on uml
Presentation on umlPresentation on uml
Presentation on uml
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
UML diagrams and symbols
UML diagrams and symbolsUML diagrams and symbols
UML diagrams and symbols
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
Sequence Diagram
Sequence DiagramSequence Diagram
Sequence Diagram
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
 
UML Class Diagram G-3-122139
UML Class Diagram G-3-122139UML Class Diagram G-3-122139
UML Class Diagram G-3-122139
 
Lecture04- Use Case Diagrams
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagrams
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
 
Classes and Objects
Classes and Objects  Classes and Objects
Classes and Objects
 
class diagram
class diagramclass diagram
class diagram
 

Destacado

Destacado (7)

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
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
Use Case Diagram
Use Case DiagramUse Case Diagram
Use Case Diagram
 

Similar a 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
 

Similar a 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
 

Último

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
 
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
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
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
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxAmita Gupta
 
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
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
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
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 

Último (20)

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.
 
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
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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...
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
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Ữ Â...
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
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
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
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
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.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