SlideShare a Scribd company logo
Advanced Class Modeling
Chapter - 4
Contents
Aggregation
Abstract Classes
Metadata
Constraints
Aggregation
 Aggregation is a special form of association which
represents the part-whole relationship between classes.
 It is a strong form of association in which an aggregate
object is made of constituent parts.
 Constituents are part of the aggregate.
 For example, a LawnMower consists of a Blade, an
Engine, many Wheels, and a Deck.
Aggregation
 LawnMower is the assembly and the other parts are
constituents. LawnMower to Blade is one aggregation,
LawnMower to Engine is another aggregation, and so
on.
 The most significant property of aggregation is
transitivity- that is, if A is part of B and B is part of C,
then A is part of C.
 Aggregation is also antisymmetric – that is, if A is part
of B, then B is not part of A. Many aggregate
operations imply transitive closure * and operate on
both direct and indirect parts.
Aggregation
Aggregation
 This diagram states that a message consists of one header,
one body and zero or more attachments. Each header and
body is part of exactly one message, but attachments can
be part of many message. Further, headers and bodies
cannot exist independently of messages, unlike
attachments.
 In uses like this, aggregation has virtually no formal
properties other than to suggest an informal notion of
“parts”.
Aggregation Versus Association
 Aggregation is a special form of association, not an
independent concept.
 If the two objects are tightly bound by a part – whole
relationship, it is an aggregation.
 Aggregation is drawn like association, expect a small
diamond indicates the assembly end.
 In fig. a lawn Mower consists of one blade, one engine,
many wheels, and one deck.
 The manufacturing process is flexible and largely combines
standard parts, so blades, engines, wheels, and decks
certain to multiple LawnMower designs.
Aggregation Versus Association
LawnMower
B
Blade
ad
Engine Wheel Deck
Aggregation Versus Association
 Aggregations include bill-of-materials, part explosions, and
expansions of an object into constituent parts.
Some tests include:
 Would you see the phrase part of?
 Do some operations on the whole automatically apply to its
parts?
 Do some attribute values propagate from the whole to all or
some parts?
 Is there an intrinsic asymmetry to the association, where
one class is subordinate to the other?
Aggregation Versus Composition
 The UML has two forms of part-whole relationships :
Aggregation and Composition
 Composition is a form of aggregation with two additional
constraints .
 Composition implies ownership of the parts by the whole.
 This can be convenient for programming: Deletion of an
assembly object triggers deletion of all constituent objects
via composition.
 The notation for composition is a small solid diamond next
to the assembly class (vs. a small hollow diamond for the
general form of aggregation).
Aggregation Versus Composition
 Composition: With composition a constituent part belongs
to at most one assembly and has a coincident lifetime with
the assembly.
Company DepartmentDivision
Person
WorksFor
Aggregation Versus Composition
 In fig. shows a company consists of divisions, which in
turn consist of departments; a company is indirectly a
composition of departments.
 A company is not a composition of its employees, since
company and person are independent objects of equal
stature.
Propagation of Operations
 Propagation (also called triggering) is the automatic
application of an operation to a network of objects when
the operation is applied to some starting object.
 For example, moving an aggregate moves its parts; the
move operation propagates to the parts. Propagation of
operations to parts is often a good indicator of aggregation.
 In fig. shows A person owns multiple documents. Each
documents consists of paragraphs that, in turn, consist of
characters.
 The copy operation propagates from documents to
paragraphs to characters.
Propagation of Operations
 Copying a paragraph copies all the characters in it.
 The operation does not propagate in the reverse direction; a
paragraph can be copied without copying the whole
document.
 Similarly, copying a document copies the owner link but
does not spawn a copy of the person who is owner.
Owns copy copy
Doc
Document
ument
copy
copy
P
Paragraph
aragraph
copy
Character
acter
cocopy
y
P
Person
erson
*1
*1*1
Abstract Classes
 An abstract class is a class that has no direct instances but
whose descendant classes have direct instances.
 A abstract class is a class that is insatiable; that is, it can
have direct instances.
 Superclasses are introduced into a model to define the
 general features of a number of related classes. Often it
does not make sense to create instances of these
superclasses.
 For example, the model of the banking system might never
create simple Account classes, but only instances of one of
the subclasses. In other words, every account must be
either a current account, or a deposit account, or . . . .
Abstract Classes
•In the case, Account would be modelled as an abstract
class.
•This can be shown typographically by writing the class
name in a slanted font:
Metadata
 Metadata is data that describes other data.
 For example, a class definition is metadata. Models are
inherently metadata, since they describe the things being
modeled .
 Many real-world applications have metadata, such as parts
catalogs, blueprints, and dictionaries.
 Objects have features, and they in turn have their own
classes, which are called metaclasses.
 In fig. shows an example of metadata and data.
 A car model has a model name, year, base price, and a
manufacturer.
Metadata
 Metadata often arises in applications
Doc
CarModel
ue
modelNam
e
Year
baseprice
copy
Doc
PhysicalCar
uet
SerialNumbe
r
color
options
copy
PersonCompany
manufacturer owner
* 1
*
1
*
1
Describes
Metadata
 Some examples of car models are a 1969 Ford Mustang and
a 1975 Volkswagen Rabbit.
 A physical car has a serial number, color, options, and an
owner.
 As an example of physical cars, John Doe may own a blue
Ford with serial number IFABP and a red Volkswagen with
serial number 7E81F.
 A car model describes many physical cars and holds
common data.
 A car model is metadata relative to a physical car, which is
data.
Constraints
 A constraint is a boolean condition involving model
elements, such as objects, classes, attributes, links,
associations, and generalization sets.
Constraints on Objects :
 In fig. shows No employee’s salary can exceed the salary of
the employee’s boss (a constraint between two things at the
same time).
 No window can have an aspect ratio (length/width) of less
than 0.8 or greater than 1.5 (a constraint between
attributes of a single object). The priority of a job may not
increase (constraint on the same object over time).
 You may place simple constraints in class models.
Constraints
 Constraints on objects. The structure of a model expresses
many constraints, but sometimes it it helpful to add explicit
constraints
Employee
Salary
Window
Length
Width
Job
priority
boss
0..1
*
{ salary < boss.salary} { 0.8 < length / width < 1.5} { priority never increases}
Constraints on Generalization Sets
 The UML defines the following keywords for generalization
sets.
Disjoint:
 The subclasses are mutually exclusive.
 Each object belongs to exactly one of the subclasses.
Overlapping:
 The subclasses can share some objects.
 An object may belong to more than one subclass.
Complete:
 The generalization lists all the possible subclasses.
Incomplete:
The generalization may be missing some subclasses.
Constraints on Links
 Multiplicity is a constraint on the cardinality of a set.
 Multiplicity for an association restricts the number of
objects related to a given object.
 Multiplicity for an attribute specifies the number of values
that are possible for each instantiation of an attribute.
 Qualification also constraints an association.
 A qualifier attribute does not merely describe the links of an
association but is also significant in resolving the “many”
objects at an association end.
 An association class implies a constraint.
 An association class is a class in every right; for example, it
can have attributes and operations, participate in
associations, and participate in generalizations.
Constraints on Links
 But an association class has a constraint that an ordinary
class does not, it derives identity from instances of the
related classes.
 An ordinary association presumes no particular order on the
objects of a “many” end.
 The constraint {ordered} indicates that the elements of a
“many” association end have an explicit order that must be
preserved.
 In fig. shows an explicit constraint that is not part of the
models structure.
 The chair of a committee must be a member of the
committee; the ChairOf association is a subset of the
MemberOf association.
Constraints on Links
 Subset constraint between associations:
Person Committee
MemberOf
{subset}
ChairOf
* *
*1
Use of Constraints
 Constraints provide one criterion for measuring the quality
of a class model; a “good” class model captures many
constraints through its structure.

More Related Content

What's hot

Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
Kaushik Ghosh
 
Class Diagram
Class DiagramClass Diagram
Class Diagram
Rana_brothers
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationshipsPooja mittal
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction DiagramNiloy Rocker
 
State Diagrams
State DiagramsState Diagrams
State Diagrams
Vaidik Trivedi
 
Class diagram- UML diagram
Class diagram- UML diagramClass diagram- UML diagram
Class diagram- UML diagram
Ramakant Soni
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
Githushan Gengaparam
 
Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagramAsraa Batool
 
Uml Activity Diagram
Uml Activity DiagramUml Activity Diagram
Uml Activity DiagramNiloy Rocker
 
Modeling- Object, Dynamic and Functional
Modeling- Object, Dynamic and FunctionalModeling- Object, Dynamic and Functional
Modeling- Object, Dynamic and Functional
Rajani Bhandari
 
Diagrams
DiagramsDiagrams
Diagrams
janessa24
 
CS8592-OOAD Lecture Notes Unit-2
CS8592-OOAD Lecture Notes Unit-2CS8592-OOAD Lecture Notes Unit-2
CS8592-OOAD Lecture Notes Unit-2
Gobinath Subramaniam
 
Domain Modeling
Domain ModelingDomain Modeling
Domain Modeling
Harsh Jegadeesan
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
Mukesh Tekwani
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
barney92
 
OMD chapter 2 Class modelling
 OMD  chapter 2 Class modelling OMD  chapter 2 Class modelling
OMD chapter 2 Class modelling
jayashri kolekar
 
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine DiagramNiloy Rocker
 
Uml class Diagram
Uml class DiagramUml class Diagram
Uml class Diagram
Satyamevjayte Haxor
 

What's hot (20)

Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
 
Class Diagram
Class DiagramClass Diagram
Class Diagram
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction Diagram
 
State Diagrams
State DiagramsState Diagrams
State Diagrams
 
Class diagrams
Class diagramsClass diagrams
Class diagrams
 
Class diagram- UML diagram
Class diagram- UML diagramClass diagram- UML diagram
Class diagram- UML diagram
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
 
Uml deployment diagram
Uml deployment diagramUml deployment diagram
Uml deployment diagram
 
Uml Activity Diagram
Uml Activity DiagramUml Activity Diagram
Uml Activity Diagram
 
Modeling- Object, Dynamic and Functional
Modeling- Object, Dynamic and FunctionalModeling- Object, Dynamic and Functional
Modeling- Object, Dynamic and Functional
 
Diagrams
DiagramsDiagrams
Diagrams
 
CS8592-OOAD Lecture Notes Unit-2
CS8592-OOAD Lecture Notes Unit-2CS8592-OOAD Lecture Notes Unit-2
CS8592-OOAD Lecture Notes Unit-2
 
Domain Modeling
Domain ModelingDomain Modeling
Domain Modeling
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
OMD chapter 2 Class modelling
 OMD  chapter 2 Class modelling OMD  chapter 2 Class modelling
OMD chapter 2 Class modelling
 
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine Diagram
 
Uml class Diagram
Uml class DiagramUml class Diagram
Uml class Diagram
 

Similar to Ooad ch 4

Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
Raj Thilak S
 
2 class use case
2 class use case2 class use case
2 class use case
Minal Maniar
 
Domain model Refinement
Domain model RefinementDomain model Refinement
Domain model Refinement
Anjan Kumar
 
Css uml
Css umlCss uml
08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagramskebsterz
 
uml2-1214558329929112-8.ppt
uml2-1214558329929112-8.pptuml2-1214558329929112-8.ppt
uml2-1214558329929112-8.ppt
AleksandarUrdarevski
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
Madhar Khan Pathan
 
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
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
AMITJain879
 
Ooad static diagram
Ooad static diagramOoad static diagram
Ooad static diagram
TSubashiniAPIICSE
 
cse 355 UML class diagram software engineering.ppt
cse 355 UML class diagram software engineering.pptcse 355 UML class diagram software engineering.ppt
cse 355 UML class diagram software engineering.ppt
Safaet Hossain
 
UML-class_diagram.ppt
UML-class_diagram.pptUML-class_diagram.ppt
UML-class_diagram.ppt
PragnyaNandaSabat
 
UML-class diagram for beginners to adance.ppt
UML-class diagram for beginners to adance.pptUML-class diagram for beginners to adance.ppt
UML-class diagram for beginners to adance.ppt
WorkDrive2
 
Interfaces & Packages V2
Interfaces & Packages V2Interfaces & Packages V2
Interfaces & Packages V2
Dr Anjan Krishnamurthy
 
Intro to UML 2
Intro to UML 2Intro to UML 2
Intro to UML 2
rchakra
 
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
 

Similar to Ooad ch 4 (20)

Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
2 class use case
2 class use case2 class use case
2 class use case
 
Domain model Refinement
Domain model RefinementDomain model Refinement
Domain model Refinement
 
Css uml
Css umlCss uml
Css uml
 
Intro Uml
Intro UmlIntro Uml
Intro Uml
 
08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagrams
 
OO & UML
OO & UMLOO & UML
OO & UML
 
uml2-1214558329929112-8.ppt
uml2-1214558329929112-8.pptuml2-1214558329929112-8.ppt
uml2-1214558329929112-8.ppt
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
Mca 504 dotnet_unit4
Mca 504 dotnet_unit4Mca 504 dotnet_unit4
Mca 504 dotnet_unit4
 
Uml report
Uml reportUml report
Uml report
 
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)
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
 
Ooad static diagram
Ooad static diagramOoad static diagram
Ooad static diagram
 
cse 355 UML class diagram software engineering.ppt
cse 355 UML class diagram software engineering.pptcse 355 UML class diagram software engineering.ppt
cse 355 UML class diagram software engineering.ppt
 
UML-class_diagram.ppt
UML-class_diagram.pptUML-class_diagram.ppt
UML-class_diagram.ppt
 
UML-class diagram for beginners to adance.ppt
UML-class diagram for beginners to adance.pptUML-class diagram for beginners to adance.ppt
UML-class diagram for beginners to adance.ppt
 
Interfaces & Packages V2
Interfaces & Packages V2Interfaces & Packages V2
Interfaces & Packages V2
 
Intro to UML 2
Intro to UML 2Intro to UML 2
Intro to UML 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
 

More from anujabeatrice2

Chapter 8 ooad
Chapter  8 ooadChapter  8 ooad
Chapter 8 ooad
anujabeatrice2
 
Chapter 7 ooad
Chapter 7 ooadChapter 7 ooad
Chapter 7 ooad
anujabeatrice2
 
Ooad ch 1_2
Ooad ch 1_2Ooad ch 1_2
Ooad ch 1_2
anujabeatrice2
 

More from anujabeatrice2 (6)

Chapter 8 ooad
Chapter  8 ooadChapter  8 ooad
Chapter 8 ooad
 
Chapter 7 ooad
Chapter 7 ooadChapter 7 ooad
Chapter 7 ooad
 
Ooad ch 5
Ooad ch 5Ooad ch 5
Ooad ch 5
 
Ooad ch 2
Ooad ch 2Ooad ch 2
Ooad ch 2
 
Ooad ch 1_2
Ooad ch 1_2Ooad ch 1_2
Ooad ch 1_2
 
Ooad ch 6
Ooad ch 6Ooad ch 6
Ooad ch 6
 

Recently uploaded

Pictures of Superficial & Deep Fascia.ppt.pdf
Pictures of Superficial & Deep Fascia.ppt.pdfPictures of Superficial & Deep Fascia.ppt.pdf
Pictures of Superficial & Deep Fascia.ppt.pdf
Dr. Rabia Inam Gandapore
 
NVBDCP.pptx Nation vector borne disease control program
NVBDCP.pptx Nation vector borne disease control programNVBDCP.pptx Nation vector borne disease control program
NVBDCP.pptx Nation vector borne disease control program
Sapna Thakur
 
Triangles of Neck and Clinical Correlation by Dr. RIG.pptx
Triangles of Neck and Clinical Correlation by Dr. RIG.pptxTriangles of Neck and Clinical Correlation by Dr. RIG.pptx
Triangles of Neck and Clinical Correlation by Dr. RIG.pptx
Dr. Rabia Inam Gandapore
 
Hemodialysis: Chapter 3, Dialysis Water Unit - Dr.Gawad
Hemodialysis: Chapter 3, Dialysis Water Unit - Dr.GawadHemodialysis: Chapter 3, Dialysis Water Unit - Dr.Gawad
Hemodialysis: Chapter 3, Dialysis Water Unit - Dr.Gawad
NephroTube - Dr.Gawad
 
How STIs Influence the Development of Pelvic Inflammatory Disease.pptx
How STIs Influence the Development of Pelvic Inflammatory Disease.pptxHow STIs Influence the Development of Pelvic Inflammatory Disease.pptx
How STIs Influence the Development of Pelvic Inflammatory Disease.pptx
FFragrant
 
basicmodesofventilation2022-220313203758.pdf
basicmodesofventilation2022-220313203758.pdfbasicmodesofventilation2022-220313203758.pdf
basicmodesofventilation2022-220313203758.pdf
aljamhori teaching hospital
 
Physiology of Chemical Sensation of smell.pdf
Physiology of Chemical Sensation of smell.pdfPhysiology of Chemical Sensation of smell.pdf
Physiology of Chemical Sensation of smell.pdf
MedicoseAcademics
 
Knee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdfKnee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdf
vimalpl1234
 
BRACHYTHERAPY OVERVIEW AND APPLICATORS
BRACHYTHERAPY OVERVIEW  AND  APPLICATORSBRACHYTHERAPY OVERVIEW  AND  APPLICATORS
BRACHYTHERAPY OVERVIEW AND APPLICATORS
Krishan Murari
 
How to Give Better Lectures: Some Tips for Doctors
How to Give Better Lectures: Some Tips for DoctorsHow to Give Better Lectures: Some Tips for Doctors
How to Give Better Lectures: Some Tips for Doctors
LanceCatedral
 
Surat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model Safe
Surat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model SafeSurat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model Safe
Surat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model Safe
Savita Shen $i11
 
micro teaching on communication m.sc nursing.pdf
micro teaching on communication m.sc nursing.pdfmicro teaching on communication m.sc nursing.pdf
micro teaching on communication m.sc nursing.pdf
Anurag Sharma
 
Alcohol_Dr. Jeenal Mistry MD Pharmacology.pdf
Alcohol_Dr. Jeenal Mistry MD Pharmacology.pdfAlcohol_Dr. Jeenal Mistry MD Pharmacology.pdf
Alcohol_Dr. Jeenal Mistry MD Pharmacology.pdf
Dr Jeenal Mistry
 
Thyroid Gland- Gross Anatomy by Dr. Rabia Inam Gandapore.pptx
Thyroid Gland- Gross Anatomy by Dr. Rabia Inam Gandapore.pptxThyroid Gland- Gross Anatomy by Dr. Rabia Inam Gandapore.pptx
Thyroid Gland- Gross Anatomy by Dr. Rabia Inam Gandapore.pptx
Dr. Rabia Inam Gandapore
 
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Oleg Kshivets
 
Physiology of Special Chemical Sensation of Taste
Physiology of Special Chemical Sensation of TastePhysiology of Special Chemical Sensation of Taste
Physiology of Special Chemical Sensation of Taste
MedicoseAcademics
 
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptxPharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Dr. Rabia Inam Gandapore
 
Evaluation of antidepressant activity of clitoris ternatea in animals
Evaluation of antidepressant activity of clitoris ternatea in animalsEvaluation of antidepressant activity of clitoris ternatea in animals
Evaluation of antidepressant activity of clitoris ternatea in animals
Shweta
 
Flu Vaccine Alert in Bangalore Karnataka
Flu Vaccine Alert in Bangalore KarnatakaFlu Vaccine Alert in Bangalore Karnataka
Flu Vaccine Alert in Bangalore Karnataka
addon Scans
 
ARTIFICIAL INTELLIGENCE IN HEALTHCARE.pdf
ARTIFICIAL INTELLIGENCE IN  HEALTHCARE.pdfARTIFICIAL INTELLIGENCE IN  HEALTHCARE.pdf
ARTIFICIAL INTELLIGENCE IN HEALTHCARE.pdf
Anujkumaranit
 

Recently uploaded (20)

Pictures of Superficial & Deep Fascia.ppt.pdf
Pictures of Superficial & Deep Fascia.ppt.pdfPictures of Superficial & Deep Fascia.ppt.pdf
Pictures of Superficial & Deep Fascia.ppt.pdf
 
NVBDCP.pptx Nation vector borne disease control program
NVBDCP.pptx Nation vector borne disease control programNVBDCP.pptx Nation vector borne disease control program
NVBDCP.pptx Nation vector borne disease control program
 
Triangles of Neck and Clinical Correlation by Dr. RIG.pptx
Triangles of Neck and Clinical Correlation by Dr. RIG.pptxTriangles of Neck and Clinical Correlation by Dr. RIG.pptx
Triangles of Neck and Clinical Correlation by Dr. RIG.pptx
 
Hemodialysis: Chapter 3, Dialysis Water Unit - Dr.Gawad
Hemodialysis: Chapter 3, Dialysis Water Unit - Dr.GawadHemodialysis: Chapter 3, Dialysis Water Unit - Dr.Gawad
Hemodialysis: Chapter 3, Dialysis Water Unit - Dr.Gawad
 
How STIs Influence the Development of Pelvic Inflammatory Disease.pptx
How STIs Influence the Development of Pelvic Inflammatory Disease.pptxHow STIs Influence the Development of Pelvic Inflammatory Disease.pptx
How STIs Influence the Development of Pelvic Inflammatory Disease.pptx
 
basicmodesofventilation2022-220313203758.pdf
basicmodesofventilation2022-220313203758.pdfbasicmodesofventilation2022-220313203758.pdf
basicmodesofventilation2022-220313203758.pdf
 
Physiology of Chemical Sensation of smell.pdf
Physiology of Chemical Sensation of smell.pdfPhysiology of Chemical Sensation of smell.pdf
Physiology of Chemical Sensation of smell.pdf
 
Knee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdfKnee anatomy and clinical tests 2024.pdf
Knee anatomy and clinical tests 2024.pdf
 
BRACHYTHERAPY OVERVIEW AND APPLICATORS
BRACHYTHERAPY OVERVIEW  AND  APPLICATORSBRACHYTHERAPY OVERVIEW  AND  APPLICATORS
BRACHYTHERAPY OVERVIEW AND APPLICATORS
 
How to Give Better Lectures: Some Tips for Doctors
How to Give Better Lectures: Some Tips for DoctorsHow to Give Better Lectures: Some Tips for Doctors
How to Give Better Lectures: Some Tips for Doctors
 
Surat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model Safe
Surat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model SafeSurat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model Safe
Surat @ℂall @Girls ꧁❤8527049040❤꧂@ℂall @Girls Service Vip Top Model Safe
 
micro teaching on communication m.sc nursing.pdf
micro teaching on communication m.sc nursing.pdfmicro teaching on communication m.sc nursing.pdf
micro teaching on communication m.sc nursing.pdf
 
Alcohol_Dr. Jeenal Mistry MD Pharmacology.pdf
Alcohol_Dr. Jeenal Mistry MD Pharmacology.pdfAlcohol_Dr. Jeenal Mistry MD Pharmacology.pdf
Alcohol_Dr. Jeenal Mistry MD Pharmacology.pdf
 
Thyroid Gland- Gross Anatomy by Dr. Rabia Inam Gandapore.pptx
Thyroid Gland- Gross Anatomy by Dr. Rabia Inam Gandapore.pptxThyroid Gland- Gross Anatomy by Dr. Rabia Inam Gandapore.pptx
Thyroid Gland- Gross Anatomy by Dr. Rabia Inam Gandapore.pptx
 
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
Lung Cancer: Artificial Intelligence, Synergetics, Complex System Analysis, S...
 
Physiology of Special Chemical Sensation of Taste
Physiology of Special Chemical Sensation of TastePhysiology of Special Chemical Sensation of Taste
Physiology of Special Chemical Sensation of Taste
 
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptxPharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
Pharynx and Clinical Correlations BY Dr.Rabia Inam Gandapore.pptx
 
Evaluation of antidepressant activity of clitoris ternatea in animals
Evaluation of antidepressant activity of clitoris ternatea in animalsEvaluation of antidepressant activity of clitoris ternatea in animals
Evaluation of antidepressant activity of clitoris ternatea in animals
 
Flu Vaccine Alert in Bangalore Karnataka
Flu Vaccine Alert in Bangalore KarnatakaFlu Vaccine Alert in Bangalore Karnataka
Flu Vaccine Alert in Bangalore Karnataka
 
ARTIFICIAL INTELLIGENCE IN HEALTHCARE.pdf
ARTIFICIAL INTELLIGENCE IN  HEALTHCARE.pdfARTIFICIAL INTELLIGENCE IN  HEALTHCARE.pdf
ARTIFICIAL INTELLIGENCE IN HEALTHCARE.pdf
 

Ooad ch 4

  • 3. Aggregation  Aggregation is a special form of association which represents the part-whole relationship between classes.  It is a strong form of association in which an aggregate object is made of constituent parts.  Constituents are part of the aggregate.  For example, a LawnMower consists of a Blade, an Engine, many Wheels, and a Deck.
  • 4. Aggregation  LawnMower is the assembly and the other parts are constituents. LawnMower to Blade is one aggregation, LawnMower to Engine is another aggregation, and so on.  The most significant property of aggregation is transitivity- that is, if A is part of B and B is part of C, then A is part of C.  Aggregation is also antisymmetric – that is, if A is part of B, then B is not part of A. Many aggregate operations imply transitive closure * and operate on both direct and indirect parts.
  • 6. Aggregation  This diagram states that a message consists of one header, one body and zero or more attachments. Each header and body is part of exactly one message, but attachments can be part of many message. Further, headers and bodies cannot exist independently of messages, unlike attachments.  In uses like this, aggregation has virtually no formal properties other than to suggest an informal notion of “parts”.
  • 7. Aggregation Versus Association  Aggregation is a special form of association, not an independent concept.  If the two objects are tightly bound by a part – whole relationship, it is an aggregation.  Aggregation is drawn like association, expect a small diamond indicates the assembly end.  In fig. a lawn Mower consists of one blade, one engine, many wheels, and one deck.  The manufacturing process is flexible and largely combines standard parts, so blades, engines, wheels, and decks certain to multiple LawnMower designs.
  • 9. Aggregation Versus Association  Aggregations include bill-of-materials, part explosions, and expansions of an object into constituent parts. Some tests include:  Would you see the phrase part of?  Do some operations on the whole automatically apply to its parts?  Do some attribute values propagate from the whole to all or some parts?  Is there an intrinsic asymmetry to the association, where one class is subordinate to the other?
  • 10. Aggregation Versus Composition  The UML has two forms of part-whole relationships : Aggregation and Composition  Composition is a form of aggregation with two additional constraints .  Composition implies ownership of the parts by the whole.  This can be convenient for programming: Deletion of an assembly object triggers deletion of all constituent objects via composition.  The notation for composition is a small solid diamond next to the assembly class (vs. a small hollow diamond for the general form of aggregation).
  • 11. Aggregation Versus Composition  Composition: With composition a constituent part belongs to at most one assembly and has a coincident lifetime with the assembly. Company DepartmentDivision Person WorksFor
  • 12. Aggregation Versus Composition  In fig. shows a company consists of divisions, which in turn consist of departments; a company is indirectly a composition of departments.  A company is not a composition of its employees, since company and person are independent objects of equal stature.
  • 13. Propagation of Operations  Propagation (also called triggering) is the automatic application of an operation to a network of objects when the operation is applied to some starting object.  For example, moving an aggregate moves its parts; the move operation propagates to the parts. Propagation of operations to parts is often a good indicator of aggregation.  In fig. shows A person owns multiple documents. Each documents consists of paragraphs that, in turn, consist of characters.  The copy operation propagates from documents to paragraphs to characters.
  • 14. Propagation of Operations  Copying a paragraph copies all the characters in it.  The operation does not propagate in the reverse direction; a paragraph can be copied without copying the whole document.  Similarly, copying a document copies the owner link but does not spawn a copy of the person who is owner. Owns copy copy Doc Document ument copy copy P Paragraph aragraph copy Character acter cocopy y P Person erson *1 *1*1
  • 15. Abstract Classes  An abstract class is a class that has no direct instances but whose descendant classes have direct instances.  A abstract class is a class that is insatiable; that is, it can have direct instances.  Superclasses are introduced into a model to define the  general features of a number of related classes. Often it does not make sense to create instances of these superclasses.  For example, the model of the banking system might never create simple Account classes, but only instances of one of the subclasses. In other words, every account must be either a current account, or a deposit account, or . . . .
  • 16. Abstract Classes •In the case, Account would be modelled as an abstract class. •This can be shown typographically by writing the class name in a slanted font:
  • 17. Metadata  Metadata is data that describes other data.  For example, a class definition is metadata. Models are inherently metadata, since they describe the things being modeled .  Many real-world applications have metadata, such as parts catalogs, blueprints, and dictionaries.  Objects have features, and they in turn have their own classes, which are called metaclasses.  In fig. shows an example of metadata and data.  A car model has a model name, year, base price, and a manufacturer.
  • 18. Metadata  Metadata often arises in applications Doc CarModel ue modelNam e Year baseprice copy Doc PhysicalCar uet SerialNumbe r color options copy PersonCompany manufacturer owner * 1 * 1 * 1 Describes
  • 19. Metadata  Some examples of car models are a 1969 Ford Mustang and a 1975 Volkswagen Rabbit.  A physical car has a serial number, color, options, and an owner.  As an example of physical cars, John Doe may own a blue Ford with serial number IFABP and a red Volkswagen with serial number 7E81F.  A car model describes many physical cars and holds common data.  A car model is metadata relative to a physical car, which is data.
  • 20. Constraints  A constraint is a boolean condition involving model elements, such as objects, classes, attributes, links, associations, and generalization sets. Constraints on Objects :  In fig. shows No employee’s salary can exceed the salary of the employee’s boss (a constraint between two things at the same time).  No window can have an aspect ratio (length/width) of less than 0.8 or greater than 1.5 (a constraint between attributes of a single object). The priority of a job may not increase (constraint on the same object over time).  You may place simple constraints in class models.
  • 21. Constraints  Constraints on objects. The structure of a model expresses many constraints, but sometimes it it helpful to add explicit constraints Employee Salary Window Length Width Job priority boss 0..1 * { salary < boss.salary} { 0.8 < length / width < 1.5} { priority never increases}
  • 22. Constraints on Generalization Sets  The UML defines the following keywords for generalization sets. Disjoint:  The subclasses are mutually exclusive.  Each object belongs to exactly one of the subclasses. Overlapping:  The subclasses can share some objects.  An object may belong to more than one subclass. Complete:  The generalization lists all the possible subclasses. Incomplete: The generalization may be missing some subclasses.
  • 23. Constraints on Links  Multiplicity is a constraint on the cardinality of a set.  Multiplicity for an association restricts the number of objects related to a given object.  Multiplicity for an attribute specifies the number of values that are possible for each instantiation of an attribute.  Qualification also constraints an association.  A qualifier attribute does not merely describe the links of an association but is also significant in resolving the “many” objects at an association end.  An association class implies a constraint.  An association class is a class in every right; for example, it can have attributes and operations, participate in associations, and participate in generalizations.
  • 24. Constraints on Links  But an association class has a constraint that an ordinary class does not, it derives identity from instances of the related classes.  An ordinary association presumes no particular order on the objects of a “many” end.  The constraint {ordered} indicates that the elements of a “many” association end have an explicit order that must be preserved.  In fig. shows an explicit constraint that is not part of the models structure.  The chair of a committee must be a member of the committee; the ChairOf association is a subset of the MemberOf association.
  • 25. Constraints on Links  Subset constraint between associations: Person Committee MemberOf {subset} ChairOf * * *1
  • 26. Use of Constraints  Constraints provide one criterion for measuring the quality of a class model; a “good” class model captures many constraints through its structure.