SlideShare uma empresa Scribd logo
1 de 55
jaya kolekar
102/07/17
Objects
Define objects as a concept, abstraction or thing with
purposeful meaning.
Two purpose of objects-
Promote understanding of the real world
Provide a practical basis for computer implementation.
All objects have identity and are distinguishable.
Object is a real-world entity that has state, behavior &
identity.
Object rendered as rectangle with round corner.
Example
2
STUDENT
Class
(STUDENT)
Ram
(STUDENT)
Jai
(STUDENT)
Objects02/07/17 jaya kolekar
Classes
An object class describes a group of objects with similar
properties (attributes), common behavior (operations),
common relationships to other objects and common
semantics.
Class rendered as rectangle with three compartments.
First compartment –class name
Second compartment- attributes
Third compartment - operations
Example
3
Class name
Attribute_name-1:data_type-1=default_value-1
Attribute_name-2:data_type-2=default_value-2
--------------
Operation_name-1(argument_list-1):result_type-1
Operation_name-2(argument_list-2):result_type-2
…………………
Student
Roll-No : Integer
Name : raj
Request_book()
Return_book(book_id)
02/07/17 jaya kolekar
Object diagram
402/07/17 jaya kolekar
example
5
Person
Class Diagram
(Person)
Ram
(Person)
Jai
(Person)
Instance Diagram
02/07/17 jaya kolekar
Attribute
An attribute is a data value held by the objects in a class.
Each attribute name is unique within a class.
An attribute should be a pure data value, not an object.
Attributes are listed out in the second part of the class
box.
Each attribute name may be followed by optional details,
such as type and default value.
The type is preceded by a colon and default value is
preceded by an equal sign.
Example
6
Person
name: string
age: integer
Class with Attributes
(Person)
Ram
24
(Person)
Jai
34
Objects with Values
02/07/17 jaya kolekar
Operations and Methods
An operation is a function or transformation that may be
applied to or by objects in a class.
All objects in a class share the same operations.
The same operation may apply to many different classes,
Such an operation is polymorphic
A method is the implementation of an operation for a class.
Operations are listed in the lower third of the class box.
Each operation name may be followed by optional details,
such as argument list and result type.
702/07/17 jaya kolekar
8
Person
name
age
change-job
change-add
Person
name
age
change-job
change-add
Person
name
age
print
File
name
size
Operations
Person
name
age
change-job
change-add
Person
name
age
Move(delta:vector)
Select(p:Point):Boolean
Rotate(angle)
Geometric object
Color
position
02/07/17 jaya kolekar
Links and Association
A link is a physical or conceptual connection between objects.
A link is an instance of an association.
An association describes a group of links with common structure and
semantics.
All the links in an association connect objects from the same classes.
Association and links often appear as verbs in a problem statement.
9
(Person)
raj
(Company)
IBM
Works_for
Person
name
Company
name
Works_for
02/07/17 jaya kolekar
Association
Associations are bidirectional.
In real, both directions of traversal are equally meaningful
and refer to same association.
Associations are often implemented in programming
languages as pointers from one object to another.
All connections among classes should be modeled as
association.
Association has three types
One-to-one association
Many-to-many association
Ternary association
1002/07/17 jaya kolekar
11
Country
name
City
name
Has-capital
(Country)
India
(City)
Delhi
Has-capital
Has-capital
Class Diagram
Instance Diagram
One-to-One Association and links
02/07/17 jaya kolekar
12
Line
name
Point
name
intersects
2+
(Line)
L1
(Line)
L2
(Line)
L3
(Point)
P1
(Line)
L4
(Line)
L5
(Point)
P2
Many-to-many Association and links
Class Diagram
Instance Diagram
02/07/17 jaya kolekar
13
Project Language
Person
(Project)
MIS
(Language)
.Net
(Project)
CAD
(Language)
C
(Person)
Jai
Ternary Association and Links
02/07/17 jaya kolekar
Multiplicity
It specifies how many instances of one class may relate
to a single instance of an associated class.
In OMT solid ball -> zero or more object
In OMT hollow ball -> optional (zero or one) object
In OMT line -> one object
Multiplicity depends upon assumptions and how you
define the boundaries of a problem.
1402/07/17 jaya kolekar
Multiplicity
”1”  exactly one
“1…*”  One or more
“3-5”  three to five
“0..1”  zero to one
“2,4,18”  two, four or eighteen
Symbol *  denotes “many”.
15
Class
Class
Class
Class
ClassClass
ClassClass
Class Class
Class Class
02/07/17 jaya kolekar
Link attributes
An link attribute is a property of the links in an
association.
16
File User
Accessible By
Access permission
/etc/temp read Ram
/etc/temp read-write Mohan
/usr/lgn read-write Shyam
Link Attributes for a many-to-many association
02/07/17 jaya kolekar
Modeling an Association as a Class
Each link becomes one instance of the class.
17
User Workstation
Authorized on
Authorization
Priority
Privileges
Start session
Directory
Home directory
Modeling an association as a class
02/07/17 jaya kolekar
Role Names
A role is one end of an association.
A binary association has 2 roles, each of which
may have a role name.
A role name is a name that uniquely identifies
one end of an association.
Roles often appear as nouns in problem
descriptions.
Use of role name is optional.
Role names are necessary for associations
between two objects of the same class.
1802/07/17 jaya kolekar
19
person company
employee employer
Works-for
Employee Employer
Ram TCS
Mohan Wipro
Role names for an association
02/07/17 jaya kolekar
Role Names
20
User Directory
owner
Authorized user
contents
container
02/07/17 jaya kolekar
ordering
If order of objects required
Indicated by writing “{ordered}” next to multiplicity
dot for the role.
21
window screen
{ordered}
Visible-on
Ordered sets in an association
02/07/17 jaya kolekar
Qualification
It relates two classes and a qualifier.
Qualifier is a special attribute that reduces the
effective multiplicity of an association.
One-to-many or many-to-many may be qualified
that can be reduced to one-to-one. ( but not
always)
It distinguishes among the set of objects at the
many end of an association.
A qualified association can also be considered a
form of ternary association.
2202/07/17 jaya kolekar
23
Directory FileFile name
A qualified association
A directory plus a file name yields a file
02/07/17 jaya kolekar
Aggregation
It is a part-of relationship
It has transitivity property i.e. A is part of B and B is
part of C then A is part of C.
It is anti symmetric i.e. if A is a part of B then B is not
a part of A.
Aggregation is a special form of association.
24
document paragraph sentence
02/07/17 jaya kolekar
Aggregation
It is a form of association in which an aggregate
object is made of components.
Components are part of aggregate.
Aggregate is inherently transitive i.e. an aggregate has
parts which may in turn have parts.
2502/07/17 jaya kolekar
Aggregation vs. Association
Aggregation is a special form of association.
If two objects are tightly bound by a part-whole relationship, it is an
aggregation.
If two objects are usually considered as independent even though they
may often be linked, it is an association.
A company is an aggregation of its divisions which are in turn
aggregations of their departments; a company is indirectly an
aggregation of departments.
A company is not an aggregation of its employees since the company
and person are independent objects of equal structure and status.
26
company division department
person
Work for
02/07/17 jaya kolekar
Recursive Aggregates
Types of Aggregation
Fixed aggregate :
 has a fixed structure , the number of types of subparts are
predefined.
 Eg : lamp
Variable aggregate:
 has a finite number of levels, but the number of parts may
vary.
 Eg : company and department
A recursive aggregation :
 contains directly or indirectly an instance of the same kind of
aggregate; the number of potential levels is unlimited .
 Eg : computer program.
2702/07/17 jaya kolekar
 Simple Statement:
x=i;
 Block(combination of more than one simple statements):
++i;
x=i;
 Compound Statement(single statement combines work of multiple
statement optionally blocks):
x=++i;
28
program
block
Compound
statement
Simple
statement
Recursive aggregate
02/07/17 jaya kolekar
Generalization
It is a relationship between a class & one or more refined versions of it.
the class being refined is called the super class & each refined version is
called a subclass.
It is “is-a” relationship because each instance of a sub class is an instance
of super class as well.
The notation for generalization is a triangle with lines, super class
connected by a line to the apex of the triangle and subclasses are
connected by lines to a horizontal bar attached to the base of the triangle.
A discriminator is an attribute of enumeration type that indicates which
property of an object is being abstracted by a particular generalization
relationship
2902/07/17 jaya kolekar
30
Inheritance for graphic figure
Figure
Color
Center Position
Thickness
Move
Select
Display
rotate
0 D 1 D 2 D
Point Line Arc Spline circlePolygon
02/07/17 jaya kolekar
Aggregation vs. Generalization
Aggregation relates instances.
Two distinct objects are involved; one of them is a
part of the other.
Generalization relates classes.
Aggregation is often called “a part of”
relationship; generalization is often called “a kind-
of” or “is-a” relationship.
Aggregation is sometimes called an “and
relationship” and generalization refers to “or
relationship”
3102/07/17 jaya kolekar
32
lamp
base cover switch wiring
incandescentfluorescent
part4part3part2part1
Aggregation and generalization
02/07/17 jaya kolekar
Propagation of operations
Propagation (triggering) is automatic application of
an operation to a network of objects when the
operation is applied to some starting object.
E.g. moving an aggregation moves its parts; the move
operation propagates to the parts.
Propagation can be possible for save, destroy, print
and lock.
The operation does not propagate in reverse
direction.
33
Person Document
copy
Paragraph
copy
Character
copy
owns
copy copy
Propagation of operations
02/07/17 jaya kolekar
Abstract classes
An abstract class is a class that has no direct instances
but whose descendent classes have direct instances.
A concrete class is a class that is instantiable.
It may have abstract subclasses but they must have
concrete descendents.
It may be leaf classes in the inheritance tree.
3402/07/17 jaya kolekar
Abstract & concrete class
35
class
concrete abstractinstance
Leaf classNon leaf class
subclass
1+ 1+
subclass
Has subclasses
Has subclasses
superclass
superclass
Direct
instances
02/07/17 jaya kolekar
Abstract classes
It’s organize features common to several classes.
It’s frequently used to define methods to be inherited by
subclasses.
It’s abstract operation defines the form of an operation for
which each concrete subclass must provide its own
implementation.
Example of Abstract class & abstract operation
36
Employee
Earning
Compute Pay {abstract}
SLRD Employee
Weekly rate
Compute pay
exempt Employee
Monthly rate
Compute pay
HRLY Employee
Hourly
Compute pay
02/07/17 jaya kolekar
Overriding operations
 Overriding for Extension
The new operation is same as inherited except it adds some behavior
usually affecting new attributes of the subclass.
eg: window and labeledwindow has draw operation
 Overriding for Restriction
The new operation restricts the inherited.
eg: set and integerset with operation add
 Overriding for Optimization
The new method must have the same external protocol (prototype) and
results as the old one but its internal representation and algorithm may
differ completely.
Eg : integerset and sortintegerset with operation maximum
 Overriding for Convenience
The new class is made a subclass of the existing class and overrides the
methods that are inconvenient.
Eg:all query operations are inherited by all subclasses(read) 3702/07/17 jaya kolekar
Multiple inheritance
It permits to have more than one super class and to inherit
features from all parents.
A class with more than one super class is called a join class.
A feature from the ancestor class found along more than one
path is inherited only once.
Conflicts among parallel definitions create ambiguities that
must be resolved in implementation.
A hollow triangle indicates disjoint subclasses while a solid
triangle indicates overlapping subclasses.
The advantage of multiple inheritance is greater power in
specifying classes and increased opportunity for reuse.
3802/07/17 jaya kolekar
Multiple inheritance
39
vehicle
WatervehicleLandvehicle
boatamphibiousvehiclecar
Multiple inheritance from overlapping classes
[ join class ]
Overlapping Classes
02/07/17 jaya kolekar
Metadata
Metadata is data that describes other data.
The definition of a class is metadata.
Models are metadata since they describe the things being modeled.
RDBMS uses metadata.
A class describes a set of instances of a given form.
The dotted arrows connect the instances to the class.
It is also useful for documenting examples and test cases.
40
Person
Name
Age
weight
(Person)
Name=ABC
Age=40
Weight=40
(Person)
Name=XYZ
Age=29
Weight=70
Notation for instantiation
02/07/17 jaya kolekar
Class descriptors
Classes are meta objects and not real world objects.
Class descriptors have features and they have their own
classes which are called meta classes.
A class attribute describes a value common to an entire
class of objects rather than data particular to each
instance.
A class operation is an operation on the class itself.
4102/07/17 jaya kolekar
Class descriptors
42
Window
Size:rectangle
Visibility:boolean
Default_size:rectangle
Display
New_window
Highest_priority_window
02/07/17 jaya kolekar
Candidate keys
A candidate key is a minimal set of attributes that
uniquely identifies an object or link.
A class may have one or more candidate keys each of
which may have different combinations and numbers
of attributes.
Each candidate key constrains the instances in a class.
Notation is {}
4302/07/17 jaya kolekar
constraints
These are functional relation between entities of an
object model.
Entity includes objects, classes, attributes, links and
associations.
A constraint restricts the values that entities can
assume.
Simple constraints may be placed in object models
and complex may be in functional model.
4402/07/17 jaya kolekar
45
Employee
salary
boss
{ salary < = boss.salary }
Window
Length
width
{ 0.8 <= length / width < = 1.5 }
Constraints on objects
02/07/17 jaya kolekar
General constraintsIt must be expressed with natural languages or
equations.
Draw a dotted line between classes involved in the
constraint and specify the details with comments in
braces.
46
Person Committee
Member_of
Chair_of
{subset }
02/07/17 jaya kolekar
Derived objects, links and attributesThe notation for a derived entity is a slash or
diagonal line on the corner of a class box, on an
association line or in front of an attribute.
Show the constraint that determines the derived
value. (optional)
47
Person
Birthdate
/age
Current date
{ age = currentdate – birthdate }
02/07/17 jaya kolekar
Homomorphism
A mapping between mathematical structures of the same type (eg
groups or rings) that preserves the structure.
similarity of form
Homos = same & morphe = structure
E.g. in a parts catalog for a automobile, a catalog item may contain
other catalog items.
Each catalog item is specified by a model number that corresponds to
number of individual manufactured items, each with its own serial
number.
The individual items are also composed of sub items.
The structure of each item’s parts has the same form as the catalog
item’s parts.
Thus the “contains” aggregation on catalog items is a homomorphism
of the “contains” aggregation on physical items.
4802/07/17 jaya kolekar
Homomorphism
It maps between two associations.
49
catalogItem
Model#
Item
Sl#
contains
containsMaps
Describes
{ item 1 contains item 2 => item1.model contains item2.model }
Homomorphism for a parts catalog
02/07/17 jaya kolekar
Homomorphism
In general, a homomorphism involves 4
relationships among 4 classes.
The homomorphism maps links of one general
association {u} into links of another general
association {t} as a many-to-one mapping.
Two instantiation relationships map elements of
one class into another:
r is a many-to-one mapping from class B to A and
s is a many-to-one mapping from class D to C.
5002/07/17 jaya kolekar
Homomorphism
51
A
C
B
D
r
s
t u
{u ( b, d)=>t ( b.r, d.s ) }
General Homomorphism
02/07/17 jaya kolekar
Homomorphism
In general where t is on a single class and u is on a
single class then A=C, B=D and r=s.
Homomorphism is a special type of relationship
between relationships.
5202/07/17 jaya kolekar
5302/07/17 jaya kolekar
5402/07/17 jaya kolekar
5502/07/17 jaya kolekar

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Types of Operating System-converted.pdf
Types of Operating System-converted.pdfTypes of Operating System-converted.pdf
Types of Operating System-converted.pdf
 
Aspect Oriented Software Development
Aspect Oriented Software DevelopmentAspect Oriented Software Development
Aspect Oriented Software Development
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Client server architecture
Client server architectureClient server architecture
Client server architecture
 
VIRTUALIZATION STRUCTURES TOOLS.docx
VIRTUALIZATION STRUCTURES TOOLS.docxVIRTUALIZATION STRUCTURES TOOLS.docx
VIRTUALIZATION STRUCTURES TOOLS.docx
 
Chap 1-language processor
Chap 1-language processorChap 1-language processor
Chap 1-language processor
 
Jeet ooad unit-2
Jeet ooad unit-2Jeet ooad unit-2
Jeet ooad unit-2
 
Deployment Diagram
Deployment DiagramDeployment Diagram
Deployment Diagram
 
Cohesion and coupling
Cohesion and couplingCohesion and coupling
Cohesion and coupling
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
Object oriented analysis
Object oriented analysisObject oriented analysis
Object oriented analysis
 
Spm unit 4
Spm unit 4Spm unit 4
Spm unit 4
 
Chapter 6 software metrics
Chapter 6 software metricsChapter 6 software metrics
Chapter 6 software metrics
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
JINI Technology
JINI TechnologyJINI Technology
JINI Technology
 
System Programming Overview
System Programming OverviewSystem Programming Overview
System Programming Overview
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Quality concept
Quality concept Quality concept
Quality concept
 
RMMM-Risk Management,Mitigation and Monitoring.
RMMM-Risk Management,Mitigation and Monitoring.RMMM-Risk Management,Mitigation and Monitoring.
RMMM-Risk Management,Mitigation and Monitoring.
 
Software requirements specification
Software requirements specificationSoftware requirements specification
Software requirements specification
 

Destaque

Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and designjayashri kolekar
 
Advanced behavioral modeling chapter 4 of omd
Advanced behavioral modeling chapter 4 of omdAdvanced behavioral modeling chapter 4 of omd
Advanced behavioral modeling chapter 4 of omdjayashri kolekar
 
Architectural modeling chapter 5 of omd
Architectural modeling chapter 5 of omdArchitectural modeling chapter 5 of omd
Architectural modeling chapter 5 of omdjayashri kolekar
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and designATS SBGI MIRAJ
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLMalek Sumaiya
 
object oriented uml modeling for traveler management system
object oriented uml modeling for traveler management systemobject oriented uml modeling for traveler management system
object oriented uml modeling for traveler management systemhriday81
 
A&D - Object Oriented Design using UML
A&D - Object Oriented Design using UMLA&D - Object Oriented Design using UML
A&D - Object Oriented Design using UMLvinay arora
 
Java Collections Framework Inroduction with Video Tutorial
Java Collections Framework Inroduction with Video TutorialJava Collections Framework Inroduction with Video Tutorial
Java Collections Framework Inroduction with Video TutorialMarcus Biel
 
Java Collection framework
Java Collection frameworkJava Collection framework
Java Collection frameworkankitgarg_er
 
Object oriented database model
Object oriented database modelObject oriented database model
Object oriented database modelPAQUIAAIZEL
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01Adil Kakakhel
 

Destaque (20)

Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
 
Advanced behavioral modeling chapter 4 of omd
Advanced behavioral modeling chapter 4 of omdAdvanced behavioral modeling chapter 4 of omd
Advanced behavioral modeling chapter 4 of omd
 
Architectural modeling chapter 5 of omd
Architectural modeling chapter 5 of omdArchitectural modeling chapter 5 of omd
Architectural modeling chapter 5 of omd
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
 
System programming
System programmingSystem programming
System programming
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UML
 
Compilers
CompilersCompilers
Compilers
 
object oriented uml modeling for traveler management system
object oriented uml modeling for traveler management systemobject oriented uml modeling for traveler management system
object oriented uml modeling for traveler management system
 
Cse 5 8sem
Cse 5 8semCse 5 8sem
Cse 5 8sem
 
MTP for MCA
MTP for MCAMTP for MCA
MTP for MCA
 
Assembler1
Assembler1Assembler1
Assembler1
 
Macro
MacroMacro
Macro
 
Loader
LoaderLoader
Loader
 
A&D - Object Oriented Design using UML
A&D - Object Oriented Design using UMLA&D - Object Oriented Design using UML
A&D - Object Oriented Design using UML
 
Parsing
ParsingParsing
Parsing
 
Java Collections Framework Inroduction with Video Tutorial
Java Collections Framework Inroduction with Video TutorialJava Collections Framework Inroduction with Video Tutorial
Java Collections Framework Inroduction with Video Tutorial
 
07 java collection
07 java collection07 java collection
07 java collection
 
Java Collection framework
Java Collection frameworkJava Collection framework
Java Collection framework
 
Object oriented database model
Object oriented database modelObject oriented database model
Object oriented database model
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01
 

Semelhante a OMD chapter 2 Class modelling

Object oriented analysis and design using uml classes and objects
Object oriented analysis and  design using uml  classes and objectsObject oriented analysis and  design using uml  classes and objects
Object oriented analysis and design using uml classes and objectsLikhithaMadddula
 
210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptxHimeshNayi
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering Madhar Khan Pathan
 
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejnejeUML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejnejessusera6a60c1
 
Descriptions of class diagrams in software
Descriptions of class diagrams in softwareDescriptions of class diagrams in software
Descriptions of class diagrams in softwaressuser9d62d6
 
Ch.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptx
Ch.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptxCh.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptx
Ch.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptxSohagSrz
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented DesignAravinth NSP
 
Object Oriented Programming Using C++
Object Oriented Programming Using C++Object Oriented Programming Using C++
Object Oriented Programming Using C++Muhammad Waqas
 
Lecture12 software design class diagram
Lecture12 software design class diagramLecture12 software design class diagram
Lecture12 software design class diagramShahid Riaz
 

Semelhante a OMD chapter 2 Class modelling (20)

2 class use case
2 class use case2 class use case
2 class use case
 
Jar chapter 2
Jar chapter 2Jar chapter 2
Jar chapter 2
 
Intro Uml
Intro UmlIntro Uml
Intro Uml
 
Css uml
Css umlCss uml
Css uml
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Software Testing and UML Lab
Software Testing and UML LabSoftware Testing and UML Lab
Software Testing and UML Lab
 
Object oriented analysis and design using uml classes and objects
Object oriented analysis and  design using uml  classes and objectsObject oriented analysis and  design using uml  classes and objects
Object oriented analysis and design using uml classes and objects
 
Uml report
Uml reportUml report
Uml report
 
UML
UMLUML
UML
 
210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejnejeUML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
 
Descriptions of class diagrams in software
Descriptions of class diagrams in softwareDescriptions of class diagrams in software
Descriptions of class diagrams in software
 
RDBMS_Unit 01
RDBMS_Unit 01RDBMS_Unit 01
RDBMS_Unit 01
 
Ch.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptx
Ch.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptxCh.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptx
Ch.03 - Class Diagram_1 OBJECT ORIENTED ANALYSIS AND DESIGN [O] .pptx
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Programming Using C++
Object Oriented Programming Using C++Object Oriented Programming Using C++
Object Oriented Programming Using C++
 
Lecture12 software design class diagram
Lecture12 software design class diagramLecture12 software design class diagram
Lecture12 software design class diagram
 
Chapter3
Chapter3Chapter3
Chapter3
 

Último

Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsDILIPKUMARMONDAL6
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptJasonTagapanGulla
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 

Último (20)

Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teams
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.ppt
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 

OMD chapter 2 Class modelling

  • 2. Objects Define objects as a concept, abstraction or thing with purposeful meaning. Two purpose of objects- Promote understanding of the real world Provide a practical basis for computer implementation. All objects have identity and are distinguishable. Object is a real-world entity that has state, behavior & identity. Object rendered as rectangle with round corner. Example 2 STUDENT Class (STUDENT) Ram (STUDENT) Jai (STUDENT) Objects02/07/17 jaya kolekar
  • 3. Classes An object class describes a group of objects with similar properties (attributes), common behavior (operations), common relationships to other objects and common semantics. Class rendered as rectangle with three compartments. First compartment –class name Second compartment- attributes Third compartment - operations Example 3 Class name Attribute_name-1:data_type-1=default_value-1 Attribute_name-2:data_type-2=default_value-2 -------------- Operation_name-1(argument_list-1):result_type-1 Operation_name-2(argument_list-2):result_type-2 ………………… Student Roll-No : Integer Name : raj Request_book() Return_book(book_id) 02/07/17 jaya kolekar
  • 6. Attribute An attribute is a data value held by the objects in a class. Each attribute name is unique within a class. An attribute should be a pure data value, not an object. Attributes are listed out in the second part of the class box. Each attribute name may be followed by optional details, such as type and default value. The type is preceded by a colon and default value is preceded by an equal sign. Example 6 Person name: string age: integer Class with Attributes (Person) Ram 24 (Person) Jai 34 Objects with Values 02/07/17 jaya kolekar
  • 7. Operations and Methods An operation is a function or transformation that may be applied to or by objects in a class. All objects in a class share the same operations. The same operation may apply to many different classes, Such an operation is polymorphic A method is the implementation of an operation for a class. Operations are listed in the lower third of the class box. Each operation name may be followed by optional details, such as argument list and result type. 702/07/17 jaya kolekar
  • 9. Links and Association A link is a physical or conceptual connection between objects. A link is an instance of an association. An association describes a group of links with common structure and semantics. All the links in an association connect objects from the same classes. Association and links often appear as verbs in a problem statement. 9 (Person) raj (Company) IBM Works_for Person name Company name Works_for 02/07/17 jaya kolekar
  • 10. Association Associations are bidirectional. In real, both directions of traversal are equally meaningful and refer to same association. Associations are often implemented in programming languages as pointers from one object to another. All connections among classes should be modeled as association. Association has three types One-to-one association Many-to-many association Ternary association 1002/07/17 jaya kolekar
  • 14. Multiplicity It specifies how many instances of one class may relate to a single instance of an associated class. In OMT solid ball -> zero or more object In OMT hollow ball -> optional (zero or one) object In OMT line -> one object Multiplicity depends upon assumptions and how you define the boundaries of a problem. 1402/07/17 jaya kolekar
  • 15. Multiplicity ”1”  exactly one “1…*”  One or more “3-5”  three to five “0..1”  zero to one “2,4,18”  two, four or eighteen Symbol *  denotes “many”. 15 Class Class Class Class ClassClass ClassClass Class Class Class Class 02/07/17 jaya kolekar
  • 16. Link attributes An link attribute is a property of the links in an association. 16 File User Accessible By Access permission /etc/temp read Ram /etc/temp read-write Mohan /usr/lgn read-write Shyam Link Attributes for a many-to-many association 02/07/17 jaya kolekar
  • 17. Modeling an Association as a Class Each link becomes one instance of the class. 17 User Workstation Authorized on Authorization Priority Privileges Start session Directory Home directory Modeling an association as a class 02/07/17 jaya kolekar
  • 18. Role Names A role is one end of an association. A binary association has 2 roles, each of which may have a role name. A role name is a name that uniquely identifies one end of an association. Roles often appear as nouns in problem descriptions. Use of role name is optional. Role names are necessary for associations between two objects of the same class. 1802/07/17 jaya kolekar
  • 19. 19 person company employee employer Works-for Employee Employer Ram TCS Mohan Wipro Role names for an association 02/07/17 jaya kolekar
  • 20. Role Names 20 User Directory owner Authorized user contents container 02/07/17 jaya kolekar
  • 21. ordering If order of objects required Indicated by writing “{ordered}” next to multiplicity dot for the role. 21 window screen {ordered} Visible-on Ordered sets in an association 02/07/17 jaya kolekar
  • 22. Qualification It relates two classes and a qualifier. Qualifier is a special attribute that reduces the effective multiplicity of an association. One-to-many or many-to-many may be qualified that can be reduced to one-to-one. ( but not always) It distinguishes among the set of objects at the many end of an association. A qualified association can also be considered a form of ternary association. 2202/07/17 jaya kolekar
  • 23. 23 Directory FileFile name A qualified association A directory plus a file name yields a file 02/07/17 jaya kolekar
  • 24. Aggregation It is a part-of relationship It has transitivity property i.e. A is part of B and B is part of C then A is part of C. It is anti symmetric i.e. if A is a part of B then B is not a part of A. Aggregation is a special form of association. 24 document paragraph sentence 02/07/17 jaya kolekar
  • 25. Aggregation It is a form of association in which an aggregate object is made of components. Components are part of aggregate. Aggregate is inherently transitive i.e. an aggregate has parts which may in turn have parts. 2502/07/17 jaya kolekar
  • 26. Aggregation vs. Association Aggregation is a special form of association. If two objects are tightly bound by a part-whole relationship, it is an aggregation. If two objects are usually considered as independent even though they may often be linked, it is an association. A company is an aggregation of its divisions which are in turn aggregations of their departments; a company is indirectly an aggregation of departments. A company is not an aggregation of its employees since the company and person are independent objects of equal structure and status. 26 company division department person Work for 02/07/17 jaya kolekar
  • 27. Recursive Aggregates Types of Aggregation Fixed aggregate :  has a fixed structure , the number of types of subparts are predefined.  Eg : lamp Variable aggregate:  has a finite number of levels, but the number of parts may vary.  Eg : company and department A recursive aggregation :  contains directly or indirectly an instance of the same kind of aggregate; the number of potential levels is unlimited .  Eg : computer program. 2702/07/17 jaya kolekar
  • 28.  Simple Statement: x=i;  Block(combination of more than one simple statements): ++i; x=i;  Compound Statement(single statement combines work of multiple statement optionally blocks): x=++i; 28 program block Compound statement Simple statement Recursive aggregate 02/07/17 jaya kolekar
  • 29. Generalization It is a relationship between a class & one or more refined versions of it. the class being refined is called the super class & each refined version is called a subclass. It is “is-a” relationship because each instance of a sub class is an instance of super class as well. The notation for generalization is a triangle with lines, super class connected by a line to the apex of the triangle and subclasses are connected by lines to a horizontal bar attached to the base of the triangle. A discriminator is an attribute of enumeration type that indicates which property of an object is being abstracted by a particular generalization relationship 2902/07/17 jaya kolekar
  • 30. 30 Inheritance for graphic figure Figure Color Center Position Thickness Move Select Display rotate 0 D 1 D 2 D Point Line Arc Spline circlePolygon 02/07/17 jaya kolekar
  • 31. Aggregation vs. Generalization Aggregation relates instances. Two distinct objects are involved; one of them is a part of the other. Generalization relates classes. Aggregation is often called “a part of” relationship; generalization is often called “a kind- of” or “is-a” relationship. Aggregation is sometimes called an “and relationship” and generalization refers to “or relationship” 3102/07/17 jaya kolekar
  • 32. 32 lamp base cover switch wiring incandescentfluorescent part4part3part2part1 Aggregation and generalization 02/07/17 jaya kolekar
  • 33. Propagation of operations Propagation (triggering) is automatic application of an operation to a network of objects when the operation is applied to some starting object. E.g. moving an aggregation moves its parts; the move operation propagates to the parts. Propagation can be possible for save, destroy, print and lock. The operation does not propagate in reverse direction. 33 Person Document copy Paragraph copy Character copy owns copy copy Propagation of operations 02/07/17 jaya kolekar
  • 34. Abstract classes An abstract class is a class that has no direct instances but whose descendent classes have direct instances. A concrete class is a class that is instantiable. It may have abstract subclasses but they must have concrete descendents. It may be leaf classes in the inheritance tree. 3402/07/17 jaya kolekar
  • 35. Abstract & concrete class 35 class concrete abstractinstance Leaf classNon leaf class subclass 1+ 1+ subclass Has subclasses Has subclasses superclass superclass Direct instances 02/07/17 jaya kolekar
  • 36. Abstract classes It’s organize features common to several classes. It’s frequently used to define methods to be inherited by subclasses. It’s abstract operation defines the form of an operation for which each concrete subclass must provide its own implementation. Example of Abstract class & abstract operation 36 Employee Earning Compute Pay {abstract} SLRD Employee Weekly rate Compute pay exempt Employee Monthly rate Compute pay HRLY Employee Hourly Compute pay 02/07/17 jaya kolekar
  • 37. Overriding operations  Overriding for Extension The new operation is same as inherited except it adds some behavior usually affecting new attributes of the subclass. eg: window and labeledwindow has draw operation  Overriding for Restriction The new operation restricts the inherited. eg: set and integerset with operation add  Overriding for Optimization The new method must have the same external protocol (prototype) and results as the old one but its internal representation and algorithm may differ completely. Eg : integerset and sortintegerset with operation maximum  Overriding for Convenience The new class is made a subclass of the existing class and overrides the methods that are inconvenient. Eg:all query operations are inherited by all subclasses(read) 3702/07/17 jaya kolekar
  • 38. Multiple inheritance It permits to have more than one super class and to inherit features from all parents. A class with more than one super class is called a join class. A feature from the ancestor class found along more than one path is inherited only once. Conflicts among parallel definitions create ambiguities that must be resolved in implementation. A hollow triangle indicates disjoint subclasses while a solid triangle indicates overlapping subclasses. The advantage of multiple inheritance is greater power in specifying classes and increased opportunity for reuse. 3802/07/17 jaya kolekar
  • 39. Multiple inheritance 39 vehicle WatervehicleLandvehicle boatamphibiousvehiclecar Multiple inheritance from overlapping classes [ join class ] Overlapping Classes 02/07/17 jaya kolekar
  • 40. Metadata Metadata is data that describes other data. The definition of a class is metadata. Models are metadata since they describe the things being modeled. RDBMS uses metadata. A class describes a set of instances of a given form. The dotted arrows connect the instances to the class. It is also useful for documenting examples and test cases. 40 Person Name Age weight (Person) Name=ABC Age=40 Weight=40 (Person) Name=XYZ Age=29 Weight=70 Notation for instantiation 02/07/17 jaya kolekar
  • 41. Class descriptors Classes are meta objects and not real world objects. Class descriptors have features and they have their own classes which are called meta classes. A class attribute describes a value common to an entire class of objects rather than data particular to each instance. A class operation is an operation on the class itself. 4102/07/17 jaya kolekar
  • 43. Candidate keys A candidate key is a minimal set of attributes that uniquely identifies an object or link. A class may have one or more candidate keys each of which may have different combinations and numbers of attributes. Each candidate key constrains the instances in a class. Notation is {} 4302/07/17 jaya kolekar
  • 44. constraints These are functional relation between entities of an object model. Entity includes objects, classes, attributes, links and associations. A constraint restricts the values that entities can assume. Simple constraints may be placed in object models and complex may be in functional model. 4402/07/17 jaya kolekar
  • 45. 45 Employee salary boss { salary < = boss.salary } Window Length width { 0.8 <= length / width < = 1.5 } Constraints on objects 02/07/17 jaya kolekar
  • 46. General constraintsIt must be expressed with natural languages or equations. Draw a dotted line between classes involved in the constraint and specify the details with comments in braces. 46 Person Committee Member_of Chair_of {subset } 02/07/17 jaya kolekar
  • 47. Derived objects, links and attributesThe notation for a derived entity is a slash or diagonal line on the corner of a class box, on an association line or in front of an attribute. Show the constraint that determines the derived value. (optional) 47 Person Birthdate /age Current date { age = currentdate – birthdate } 02/07/17 jaya kolekar
  • 48. Homomorphism A mapping between mathematical structures of the same type (eg groups or rings) that preserves the structure. similarity of form Homos = same & morphe = structure E.g. in a parts catalog for a automobile, a catalog item may contain other catalog items. Each catalog item is specified by a model number that corresponds to number of individual manufactured items, each with its own serial number. The individual items are also composed of sub items. The structure of each item’s parts has the same form as the catalog item’s parts. Thus the “contains” aggregation on catalog items is a homomorphism of the “contains” aggregation on physical items. 4802/07/17 jaya kolekar
  • 49. Homomorphism It maps between two associations. 49 catalogItem Model# Item Sl# contains containsMaps Describes { item 1 contains item 2 => item1.model contains item2.model } Homomorphism for a parts catalog 02/07/17 jaya kolekar
  • 50. Homomorphism In general, a homomorphism involves 4 relationships among 4 classes. The homomorphism maps links of one general association {u} into links of another general association {t} as a many-to-one mapping. Two instantiation relationships map elements of one class into another: r is a many-to-one mapping from class B to A and s is a many-to-one mapping from class D to C. 5002/07/17 jaya kolekar
  • 51. Homomorphism 51 A C B D r s t u {u ( b, d)=>t ( b.r, d.s ) } General Homomorphism 02/07/17 jaya kolekar
  • 52. Homomorphism In general where t is on a single class and u is on a single class then A=C, B=D and r=s. Homomorphism is a special type of relationship between relationships. 5202/07/17 jaya kolekar