SlideShare a Scribd company logo
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
Ad

More Related Content

What's hot (20)

Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
AMITJain879
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
Kartik Raghuvanshi
 
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
 
Unit 1( modelling concepts & class modeling)
Unit  1( modelling concepts & class modeling)Unit  1( modelling concepts & class modeling)
Unit 1( modelling concepts & class modeling)
Manoj Reddy
 
Types and roles
Types and rolesTypes and roles
Types and roles
Satyamevjayte Haxor
 
Uml class-diagram
Uml class-diagramUml class-diagram
Uml class-diagram
ASHOK KUMAR PALAKI
 
Class diagrams
Class diagramsClass diagrams
Class diagrams
Nadia_Nazeer
 
Domain model
Domain modelDomain model
Domain model
Eagle Eyes
 
Presentation on uml
Presentation on umlPresentation on uml
Presentation on uml
Shruti Dalela
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
jayashri kolekar
 
Ooad
OoadOoad
Ooad
gantib
 
Uml structural diagrams
Uml structural diagramsUml structural diagrams
Uml structural diagrams
Swathy T
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
AMITJain879
 
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
jayashri kolekar
 
Software requirement specification
Software requirement specificationSoftware requirement specification
Software requirement specification
shiprashakya2
 
Uml with detail
Uml with detailUml with detail
Uml with detail
Hamza Khan
 
Software Design and Modularity
Software Design and ModularitySoftware Design and Modularity
Software Design and Modularity
Danyal Ahmad
 
Slide 5 Class Diagram
Slide 5 Class DiagramSlide 5 Class Diagram
Slide 5 Class Diagram
Niloy Rocker
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
Debajyoti Biswas
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
ATS SBGI MIRAJ
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
AMITJain879
 
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
 
Unit 1( modelling concepts & class modeling)
Unit  1( modelling concepts & class modeling)Unit  1( modelling concepts & class modeling)
Unit 1( modelling concepts & class modeling)
Manoj Reddy
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
jayashri kolekar
 
Uml structural diagrams
Uml structural diagramsUml structural diagrams
Uml structural diagrams
Swathy T
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
AMITJain879
 
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
jayashri kolekar
 
Software requirement specification
Software requirement specificationSoftware requirement specification
Software requirement specification
shiprashakya2
 
Uml with detail
Uml with detailUml with detail
Uml with detail
Hamza Khan
 
Software Design and Modularity
Software Design and ModularitySoftware Design and Modularity
Software Design and Modularity
Danyal Ahmad
 
Slide 5 Class Diagram
Slide 5 Class DiagramSlide 5 Class Diagram
Slide 5 Class Diagram
Niloy Rocker
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
ATS SBGI MIRAJ
 

Viewers also liked (20)

Basic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMDBasic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMD
jayashri kolekar
 
Architectural modeling chapter 5 of omd
Architectural modeling chapter 5 of omdArchitectural modeling chapter 5 of omd
Architectural modeling chapter 5 of omd
jayashri kolekar
 
System programming
System programmingSystem programming
System programming
jayashri kolekar
 
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
Malek Sumaiya
 
Compilers
CompilersCompilers
Compilers
jayashri kolekar
 
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
hriday81
 
Cse 5 8sem
Cse 5 8semCse 5 8sem
Cse 5 8sem
kumar Dinoth
 
MTP for MCA
MTP for MCAMTP for MCA
MTP for MCA
Tushar Rajput
 
Assembler1
Assembler1Assembler1
Assembler1
jayashri kolekar
 
Macro
MacroMacro
Macro
jayashri kolekar
 
Loader
LoaderLoader
Loader
jayashri kolekar
 
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
vinay arora
 
Parsing
ParsingParsing
Parsing
jayashri kolekar
 
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
Marcus Biel
 
07 java collection
07 java collection07 java collection
07 java collection
Abhishek Khune
 
Java Collection framework
Java Collection frameworkJava Collection framework
Java Collection framework
ankitgarg_er
 
Object oriented database model
Object oriented database modelObject oriented database model
Object oriented database model
PAQUIAAIZEL
 
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
Adil Kakakhel
 
Uml diagram for_hospital_management_system
Uml diagram for_hospital_management_systemUml diagram for_hospital_management_system
Uml diagram for_hospital_management_system
Pradeep Bhosale
 
Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)
Angelin R
 
Basic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMDBasic behavioral modeling chapter 3 of OMD
Basic behavioral modeling chapter 3 of OMD
jayashri kolekar
 
Architectural modeling chapter 5 of omd
Architectural modeling chapter 5 of omdArchitectural modeling chapter 5 of omd
Architectural modeling chapter 5 of omd
jayashri kolekar
 
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
Malek 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 system
hriday81
 
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
vinay 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 Tutorial
Marcus Biel
 
Java Collection framework
Java Collection frameworkJava Collection framework
Java Collection framework
ankitgarg_er
 
Object oriented database model
Object oriented database modelObject oriented database model
Object oriented database model
PAQUIAAIZEL
 
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
Adil Kakakhel
 
Uml diagram for_hospital_management_system
Uml diagram for_hospital_management_systemUml diagram for_hospital_management_system
Uml diagram for_hospital_management_system
Pradeep Bhosale
 
Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)
Angelin R
 
Ad

Similar to OMD chapter 2 Class modelling (20)

2 class use case
2 class use case2 class use case
2 class use case
Minal Maniar
 
Jar chapter 2
Jar chapter 2Jar chapter 2
Jar chapter 2
Reham Maher El-Safarini
 
Intro Uml
Intro UmlIntro Uml
Intro Uml
Kris der Rose
 
objectmodeling-121201024636-phpapp01.ppt
objectmodeling-121201024636-phpapp01.pptobjectmodeling-121201024636-phpapp01.ppt
objectmodeling-121201024636-phpapp01.ppt
DrKBManwade
 
Css uml
Css umlCss uml
Css uml
suman Aggarwal
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
Raj Thilak S
 
Software Testing and UML Lab
Software Testing and UML LabSoftware Testing and UML Lab
Software Testing and UML Lab
Harsh Kishore Mishra
 
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
LikhithaMadddula
 
Uml report
Uml reportUml report
Uml report
Franco Valdez
 
UML
UMLUML
UML
Ashish Jha
 
210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx
HimeshNayi
 
Software Designing Qualified Association
Software Designing Qualified AssociationSoftware Designing Qualified Association
Software Designing Qualified Association
KhushiAgarwal193641
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
Madhar Khan Pathan
 
UML Chart Designing Methods - Lecture.pptx
UML Chart Designing Methods - Lecture.pptxUML Chart Designing Methods - Lecture.pptx
UML Chart Designing Methods - Lecture.pptx
lankanking4
 
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejnejeUML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
ssusera6a60c1
 
UML Overview and Introduction functions.pdf
UML Overview and Introduction functions.pdfUML Overview and Introduction functions.pdf
UML Overview and Introduction functions.pdf
prathipaceec
 
Descriptions of class diagrams in software
Descriptions of class diagrams in softwareDescriptions of class diagrams in software
Descriptions of class diagrams in software
ssuser9d62d6
 
RDBMS_Unit 01
RDBMS_Unit 01RDBMS_Unit 01
RDBMS_Unit 01
Prashanth Shivakumar
 
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
SohagSrz
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
Aravinth NSP
 
objectmodeling-121201024636-phpapp01.ppt
objectmodeling-121201024636-phpapp01.pptobjectmodeling-121201024636-phpapp01.ppt
objectmodeling-121201024636-phpapp01.ppt
DrKBManwade
 
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
LikhithaMadddula
 
210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx
HimeshNayi
 
Software Designing Qualified Association
Software Designing Qualified AssociationSoftware Designing Qualified Association
Software Designing Qualified Association
KhushiAgarwal193641
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
Madhar Khan Pathan
 
UML Chart Designing Methods - Lecture.pptx
UML Chart Designing Methods - Lecture.pptxUML Chart Designing Methods - Lecture.pptx
UML Chart Designing Methods - Lecture.pptx
lankanking4
 
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejnejeUML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
UML_Lecture.pptxnd bfdjjrnekdddkeeeenekejneje
ssusera6a60c1
 
UML Overview and Introduction functions.pdf
UML Overview and Introduction functions.pdfUML Overview and Introduction functions.pdf
UML Overview and Introduction functions.pdf
prathipaceec
 
Descriptions of class diagrams in software
Descriptions of class diagrams in softwareDescriptions of class diagrams in software
Descriptions of class diagrams in software
ssuser9d62d6
 
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
SohagSrz
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
Aravinth NSP
 
Ad

Recently uploaded (20)

PRIZ Academy - Functional Modeling In Action with PRIZ.pdf
PRIZ Academy - Functional Modeling In Action with PRIZ.pdfPRIZ Academy - Functional Modeling In Action with PRIZ.pdf
PRIZ Academy - Functional Modeling In Action with PRIZ.pdf
PRIZ Guru
 
Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
ijflsjournal087
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Dynamics of Structures with Uncertain Properties.pptx
Dynamics of Structures with Uncertain Properties.pptxDynamics of Structures with Uncertain Properties.pptx
Dynamics of Structures with Uncertain Properties.pptx
University of Glasgow
 
Building-Services-Introduction-Notes.pdf
Building-Services-Introduction-Notes.pdfBuilding-Services-Introduction-Notes.pdf
Building-Services-Introduction-Notes.pdf
Lawrence Omai
 
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
Reflections on Morality, Philosophy, and History
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Analog electronic circuits with some imp
Analog electronic circuits with some impAnalog electronic circuits with some imp
Analog electronic circuits with some imp
KarthikTG7
 
Parameter-Efficient Fine-Tuning (PEFT) techniques across language, vision, ge...
Parameter-Efficient Fine-Tuning (PEFT) techniques across language, vision, ge...Parameter-Efficient Fine-Tuning (PEFT) techniques across language, vision, ge...
Parameter-Efficient Fine-Tuning (PEFT) techniques across language, vision, ge...
roshinijoga
 
DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control
 
Routing Riverdale - A New Bus Connection
Routing Riverdale - A New Bus ConnectionRouting Riverdale - A New Bus Connection
Routing Riverdale - A New Bus Connection
jzb7232
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
Redirects Unraveled: From Lost Links to Rickrolls
Redirects Unraveled: From Lost Links to RickrollsRedirects Unraveled: From Lost Links to Rickrolls
Redirects Unraveled: From Lost Links to Rickrolls
Kritika Garg
 
Interfacing PMW3901 Optical Flow Sensor with ESP32
Interfacing PMW3901 Optical Flow Sensor with ESP32Interfacing PMW3901 Optical Flow Sensor with ESP32
Interfacing PMW3901 Optical Flow Sensor with ESP32
CircuitDigest
 
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning ModelsMode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Journal of Soft Computing in Civil Engineering
 
PRIZ Academy - Functional Modeling In Action with PRIZ.pdf
PRIZ Academy - Functional Modeling In Action with PRIZ.pdfPRIZ Academy - Functional Modeling In Action with PRIZ.pdf
PRIZ Academy - Functional Modeling In Action with PRIZ.pdf
PRIZ Guru
 
Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
6th International Conference on Big Data, Machine Learning and IoT (BMLI 2025)
ijflsjournal087
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Dynamics of Structures with Uncertain Properties.pptx
Dynamics of Structures with Uncertain Properties.pptxDynamics of Structures with Uncertain Properties.pptx
Dynamics of Structures with Uncertain Properties.pptx
University of Glasgow
 
Building-Services-Introduction-Notes.pdf
Building-Services-Introduction-Notes.pdfBuilding-Services-Introduction-Notes.pdf
Building-Services-Introduction-Notes.pdf
Lawrence Omai
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Analog electronic circuits with some imp
Analog electronic circuits with some impAnalog electronic circuits with some imp
Analog electronic circuits with some imp
KarthikTG7
 
Parameter-Efficient Fine-Tuning (PEFT) techniques across language, vision, ge...
Parameter-Efficient Fine-Tuning (PEFT) techniques across language, vision, ge...Parameter-Efficient Fine-Tuning (PEFT) techniques across language, vision, ge...
Parameter-Efficient Fine-Tuning (PEFT) techniques across language, vision, ge...
roshinijoga
 
DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
Routing Riverdale - A New Bus Connection
Routing Riverdale - A New Bus ConnectionRouting Riverdale - A New Bus Connection
Routing Riverdale - A New Bus Connection
jzb7232
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
Redirects Unraveled: From Lost Links to Rickrolls
Redirects Unraveled: From Lost Links to RickrollsRedirects Unraveled: From Lost Links to Rickrolls
Redirects Unraveled: From Lost Links to Rickrolls
Kritika Garg
 
Interfacing PMW3901 Optical Flow Sensor with ESP32
Interfacing PMW3901 Optical Flow Sensor with ESP32Interfacing PMW3901 Optical Flow Sensor with ESP32
Interfacing PMW3901 Optical Flow Sensor with ESP32
CircuitDigest
 

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
  翻译: