Object Modeling in Software Development

 
 
Visit for more Learning Resources
2. Class Modeling
An object model captures the static
structure of a system by showing the
objects in the system ,and relationship
between the objects, and the attributes
and operations that characterize each
class of objects.
Object modeling gives the static
structure of objects, classes and their
relationship to one another.
Object model is useful for
demonstration of a system to
customers.
Objects
The purpose of object modeling is to
describe objects.
Object promotes understanding of the
real world and provide a practical basis
for computer implementation.
Objects are separate ,distinguishable
entities. They are basic entities.
Object means a single thing or
group of similar things.
Example: 
1.A single apple : 1 object
2. Two to three apple : Group of object
Another example a 1 person and a group of
person
Classes
A class is a group of objects with similar
properties(attributes),behaviour(operation),co
mmon relationship to other objects .
A class is a collection of objects of similar
types.
Once a class has been defined we can create
any number of objects belonging to the same
class.
Example:- table, chair,desk are objects of class
furniture.
Fig. Class & Objects
Class 
   
object                  object
TYCOMPUTER
(TYCOMPUTER)
     Sanjivani
(TYCOMPUTER)      
         Bhavana
Class is represented by rectangle box
whereas objects are represented by
rounded box.
Object Diagram
Object diagram provides a graphical representation.
It gives graphical representation of objects ,classes
and their relationship to one another.
There are two types of object diagrams.
1.Class diagrams
2.Instance diagrams
A class diagram is a rectangle for
describing many possible instances
(object) of data.
Class diagram describes object classes i.e.
objects.
An instance diagram describes object
instances.
Attributes(data)
An attribute is nothing but data values of an object.
Ex:- Name ,age and address are attributes of
TYCOMPUTER objects.
Each object has value for each object instance.
Ex:- attribute AGE of TYCOMPUTER class has value
“16”.
Fig. Attributes and values
Class with attributes                      
 
Objects with values
TYCOMPUTER
Name:string
Age:Integer
(TYCOMPUTER)
      Sanjivani
              18
(TYCOMPUTER)
      Bhavana
           20
Class TYCOMPUTER has a attributes name
and age. Name is string and age is  an
integer.
One object in class TYCOMPUTER has the
value Sanjivani for name and 18 for age.
Operations and Methods
An operation is nothing but function which is used by
objects in a class.
The same operation may be applied to many
different classes. Such an operation is polymorphic.
Ex:- The class NUMBER may have operation
ADD.Different methods could be implemented to add
integer numbers, add float numbers.
All these methods perform the same task:addition of
numbers.
Fig.Operations
The class TYCOMPUTER has name & age as attributes
and operations change class & change address.
TYCOMPUTER
Name
Age
Change class
Change Address
Object modeling Notation for Class
A class is represented in a BOX which has 3 parts.
1
st
 part: Class name
2
nd
 part: Attributes
3
rd
 part: Operations
Links And Associations
Links and associations are the ways of connections
among objects and classes.
A link is physical connection between objects.
A link is an instance of an association.
A link shows relationship between two or more
objects.
Associations
An association is a group of links with common
structure.
All the links in an association connect object from the
same classes.
Associations are bi-directional.
Associations are of many types like one-to-
one,multiplicity,binary,ternary  or higher order.
The OMT notation for an association is  a line
between classes.
Association names are written on that line in italic
font.
Fig.One to One association & Links
Class Diagram
Each Country class has capital city class.
So Has_Capital is the name of the association
Country
Name
City
Name
Has Capital
Class Diagram
Fig.One to One association & Links
Instance Diagram(Object Diagram)
 
 
 
(Country)
     India
(City)
Delhi
(Country)
     USA
(city)
Washington
Has_capital
Has_capital
Software Design (UML)
Association Relationships
If two classes in a model need to communicate
with each other, there must be link between
them. 
An 
association
 denotes that link.
Instructor
Student
Software Design (UML)
Association Relationships (Cont’d)
We can indicate the 
multiplicity
 of an association by
adding 
multiplicity adornments
 to the line denoting
the association. 
The example indicates that a 
Student
 has one or more
Instructors
:
Instructor
Student
1..*
Software Design (UML)
Association Relationships (Cont’d)
The example indicates that every
Instructor
 has one or more 
Students
:
Instructor
Student
1..*
Multiplicity Association
Multiplicity is described as being one or many.
Multiplicity shows how many instances of one class
may relate to a single instance of an associated class. 
Multiplicity shows the number of related objects.
 
Class Diagram
LINE
Name
Point
Name
 Intersects
Many to Many association & Links
 
Line(L1)
Line(L2)
Line(L3)
Line(L4)
Line(L5)
Line P2
Line P1
Ternary Association
The OMT symbol for ternary association is a diamond
with lines connecting to related classes.
The name association is written next to the diamond.
A person who are programmers use computer
languages on projects.
Ternary Association and Links
 
PROJECT
LANGUAGE
PERSON
Multiplicity
An association represents a structural
relationship among objects. 
It’s important for you to state how many
objects may be connected across an
instance of an association. This “how
many” is called the multiplicity of an
association’s role, and is return as an
expression that evaluates to a range of
values or an explicit value
 
Optional Multiplicity
It is also called as zero or one ,or optional
multiplicity.
Advanced Link & Association
Link Attribute: A link attribute is a
property of the links in an association.
It is a property of the objects in a class
similar to the attribute.
The OMT notation for a link attribute
is a box attached to the association by
a loop symbol
.
Fig.Link Attribute
 
FILE
User
ACCESS
PERMISSION
Accessible By
Access permission is an attribute of accessible by link.
Link Attribute for One to Many
Association
Each person working for a
company receives a salary and
has a job title. The BOSS
calculates the performance of
each worker.
Link Attribute For Ternary Association
A cricketer may play for many teams
in a given year.
A cricketer may also play many years
for the same team.
Each team has many cricketers.
For each combination of team and
year ,a cricketer has record of runs and
wickets.
ROLE NAMES
A role is one end of association. A role name is
a name written at one end of association.
EX:A person assumes the role of employee
w.r.to a company and a company assumes the
role of employer w.r.to a person.
A role name is written next to the association
line near the class that plays the role.
Software Design (UML)
We can also indicate the behavior
of an object in an association (
i.e.,
the 
role 
of an object) using
rolenames.
Instructor
Student
1..*
1..*
learns from
teaches
Ordering
It is a special kind of facility available in OMD.
It can be considered as a set.
Such kind of externally ordered objects are
denoted by writing {ordered} on the “many”
end of an association. i.e. next to the multiplicity
dot for the role.
Ordered Sets in an association
 
WINDOW
SCREEN
Visible on
Qualification
The Qualifier is a special
attribute that reduces the
effective multiplicity of an
association.
Aggregation
An aggregation is a special form of
association that models a whole-part
relationship  between an aggregate (the
whole) and its parts.
The OMT Notation for aggregation is:
Aggregation is the (*the*) relationship
between two classes.
 When object of one class has an
(*has*) object of another, if second is a
part of first (containment relationship)
then we called that there is an
aggregation between two classes.
Examples:
A Library contains Books
Within a company Departments
are made-up of Employees.
A Computer is composed of a
number of Devices.
Example: an 
Custome
r has an 
Address
.
We use aggregation because the two
classes represent part of a larger whole.
We have also chosen to model 
Address
 as
a separate class, since many other kinds of
things have addresses as well.
An aggregate object can hold other
objects together
 
 
 
52
Object aggregation
V
i
d
e
o
t
a
p
e
T
a
p
e
 
i
d
s
.
L
e
c
t
u
r
e
n
o
t
e
s
T
e
x
t
O
H
P
 
s
l
i
d
e
s
S
l
i
d
e
s
A
s
s
i
g
n
m
e
n
t
C
r
e
d
i
t
s
S
o
l
u
t
i
o
n
s
T
e
x
t
D
i
a
g
r
a
m
s
E
x
e
r
c
i
s
e
s
#
P
r
o
b
l
e
m
s
 
 
D
e
s
c
r
i
p
t
i
o
n
C
o
u
r
s
e
 
t
i
t
l
e
N
u
m
b
e
r
Y
e
a
r
I
n
s
t
r
u
c
t
o
r
S
t
u
d
y
 
p
a
c
k
1 ..*
1
1
1
1
0 ..*
1 ..*
1 ..*
1
1
1 ..*
1 ..*
Association is a relationship between two
objects. Association defines the multiplicity
between objects. 
You may be aware of one-to-one, one-to-many,
many-to-one, many-to-many all these words
define an association between objects.
 Aggregation is a special form of association.
Example:
 
A Student and a Faculty are having an
association.
 
 
Aggregation is a special case of
association.
 A directional association between
objects. When an object ‘has-a’ another
object, then you have got an aggregation
between them. Direction between them
specified which object contains the other
object. 
Aggregation is also called a “Has-a”
relationship.
Generalization
generalization
 is a relationship
between a general thing and a
more specific kind of that thing.
Generalization is some times called
as “is-a-kind-of” relationship:
Generalization
 is the process of
extracting shared characteristics
from two or more classes, and
combining them into a generalized
superclass. Shared characteristics
can be attributes, associations, or
methods.
Propogation Of Operations
When the operation is applied to
some starting object,the automatic
application of an operation to a
network of objects is called
propogation.
Multiple Inheritance
A class can inherit features
of two or more classes .
This is known as Multiple
Inheritance.
 
A class may inherit features from
more than one superclass. A
class with more than one super
class is called as a JOIN class.
Grouping Constructs
Module:- A module is a part of model.
A module is a logical way of grouping
classes, associations and generalization.
Module gives us view of object model
as combination of different parts.
Class names & association names must
be unique within a module.
Meta Data
Meta data is defined as the data that
describes other data.
For example Database tables are
defined for stroing information.
RDBMS has several metatables that
store table definations.
For more detail contact us
Slide Note
Embed
Share

Object modeling is a crucial concept in software development, capturing the static structure of a system by depicting objects, their relationships, attributes, and operations. This modeling method aids in demonstrating systems to stakeholders and promotes a deeper understanding of real-world entities. Objects, classes, and their interactions are essential components in object modeling, helping create a practical basis for computer implementation. Learn more about object modeling, classes, objects, and object diagrams in this informative content.

  • Software Development
  • Object Modeling
  • Classes and Objects
  • Object Diagrams
  • System Modeling

Uploaded on Aug 17, 2024 | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Visit for more Learning Resources Visit for more Learning Resources

  2. 2. Class Modeling An object model captures the static structure of a system by showing the objects in the system ,and relationship between the objects, and the attributes and operations that characterize each class of objects.

  3. Object modeling gives the static structure of objects, classes and their relationship to one another. Object model is useful for demonstration of a system to customers.

  4. Objects The purpose of object modeling is to describe objects. Object promotes understanding of the real world and provide a practical basis for computer implementation. Objects are separate ,distinguishable entities. They are basic entities.

  5. Object means a single thing or group of similar things. Example: 1.A single apple : 1 object 2. Two to three apple : Group of object Another example a 1 person and a group of person

  6. Classes A class is a group of objects with similar properties(attributes),behaviour(operation),co mmon relationship to other objects . A class is a collection of objects of similar types. Once a class has been defined we can create any number of objects belonging to the same class. Example:- table, chair,desk are objects of class furniture.

  7. Fig. Class & Objects Class object object (TYCOMPUTER) Sanjivani (TYCOMPUTER) Bhavana TYCOMPUTER Class is represented by rectangle box whereas objects are represented by rounded box.

  8. Object Diagram Object diagram provides a graphical representation. It gives graphical representation of objects ,classes and their relationship to one another. There are two types of object diagrams. 1.Class diagrams 2.Instance diagrams

  9. A class diagram is a rectangle for describing many possible instances (object) of data. Class diagram describes object classes i.e. objects. An instance diagram describes object instances.

  10. Attributes(data) An attribute is nothing but data values of an object. Ex:- Name ,age and address are attributes of TYCOMPUTER objects. Each object has value for each object instance. Ex:- attribute AGE of TYCOMPUTER class has value 16 .

  11. Fig. Attributes and values Class with attributes Objects with values TYCOMPUTER (TYCOMPUTER) Sanjivani 18 (TYCOMPUTER) Bhavana 20 Name:string Age:Integer

  12. Class TYCOMPUTER has a attributes name and age. Name is string and age is an integer. One object in class TYCOMPUTER has the value Sanjivani for name and 18 for age.

  13. Operations and Methods An operation is nothing but function which is used by objects in a class. The same operation may be applied to many different classes. Such an operation is polymorphic. Ex:- The class NUMBER may have operation ADD.Different methods could be implemented to add integer numbers, add float numbers. All these methods perform the same task:addition of numbers.

  14. Fig.Operations The class TYCOMPUTER has name & age as attributes and operations change class & change address. TYCOMPUTER Name Age Change class Change Address

  15. Object modeling Notation for Class A class is represented in a BOX which has 3 parts. 1st part: Class name 2nd part: Attributes 3rd part: Operations

  16. Links And Associations Links and associations are the ways of connections among objects and classes. A link is physical connection between objects. A link is an instance of an association. A link shows relationship between two or more objects.

  17. Associations An association is a group of links with common structure. All the links in an association connect object from the same classes. Associations are bi-directional. Associations are of many types like one-to- one,multiplicity,binary,ternary or higher order. The OMT notation for an association is a line between classes. Association names are written on that line in italic font.

  18. Fig.One to One association & Links Class Diagram Each Country class has capital city class. So Has_Capital is the name of the association Has Capital Country City Name Name Class Diagram

  19. Fig.One to One association & Links Instance Diagram(Object Diagram) Has_capital (City) Delhi (Country) India (Country) USA Has_capital (city) Washington

  20. Association Relationships If two classes in a model need to communicate with each other, there must be link between them. An association denotes that link. Student Instructor Software Design (UML)

  21. Association Relationships (Contd) We can indicate the multiplicity of an association by adding multiplicity adornments to the line denoting the association. The example indicates that a Student has one or more Instructors: Student Instructor 1..* Software Design (UML)

  22. Association Relationships (Contd) The example indicates that every Instructor has one or more Students: Student Instructor 1..* Software Design (UML)

  23. Multiplicity Association Multiplicity is described as being one or many. Multiplicity shows how many instances of one class may relate to a single instance of an associated class. Multiplicity shows the number of related objects.

  24. Class Diagram LINE Intersects Point Name Name

  25. Many to Many association & Links Line(L1) Line P1 Line(L2) Line(L3) Line P2 Line(L4) Line(L5)

  26. Ternary Association The OMT symbol for ternary association is a diamond with lines connecting to related classes. The name association is written next to the diamond. A person who are programmers use computer languages on projects.

  27. Ternary Association and Links LANGUAGE PROJECT PERSON

  28. Multiplicity An association represents a structural relationship among objects. It s important for you to state how many objects may be connected across an instance of an association. This how many is called the multiplicity of an association s role, and is return as an expression that evaluates to a range of values or an explicit value

  29. Optional Multiplicity It is also called as zero or one ,or optional multiplicity.

  30. Advanced Link & Association Link Attribute: A link attribute is a property of the links in an association. It is a property of the objects in a class similar to the attribute. The OMT notation for a link attribute is a box attached to the association by a loop symbol.

  31. Fig.Link Attribute Accessible By FILE User ACCESS PERMISSION Access permission is an attribute of accessible by link.

  32. Link Attribute for One to Many Association Each person working for a company receives a salary and has a job title. The BOSS calculates the performance of each worker.

  33. Link Attribute For Ternary Association A cricketer may play for many teams in a given year. A cricketer may also play many years for the same team. Each team has many cricketers. For each combination of team and year ,a cricketer has record of runs and wickets.

  34. ROLE NAMES A role is one end of association. A role name is a name written at one end of association. EX:A person assumes the role of employee w.r.to a company and a company assumes the role of employer w.r.to a person. A role name is written next to the association line near the class that plays the role.

  35. We can also indicate the behavior of an object in an association (i.e., the role of an object) using rolenames. teaches learns from Student Instructor 1..* 1..* Software Design (UML)

  36. Ordering It is a special kind of facility available in OMD. It can be considered as a set. Such kind of externally ordered objects are denoted by writing {ordered} on the many end of an association. i.e. next to the multiplicity dot for the role.

  37. Ordered Sets in an association SCREEN WINDOW Visible on

  38. Qualification The Qualifier is a special attribute that reduces the effective multiplicity of an association.

  39. Aggregation An aggregation is a special form of association that models a whole-part relationship between an aggregate (the whole) and its parts. The OMT Notation for aggregation is:

  40. Aggregation is the (*the*) relationship between two classes. When object of one class has an (*has*) object of another, if second is a part of first (containment relationship) then we called that there is an aggregation between two classes.

  41. Examples: A Library contains Books Within a company Departments are made-up of Employees. A Computer is composed of a number of Devices.

  42. Example: an Customer has an Address. We use aggregation because the two classes represent part of a larger whole. We have also chosen to model Address as a separate class, since many other kinds of things have addresses as well. An aggregate object can hold other objects together

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#