SlideShare a Scribd company logo
1 of 38
MODELLING WITH OBJECTS
Reference: PRACTICAL OBJECT-
ORIENTED DESIGN WITH UML, Mark
Priestley
• Objects
• Links
• Messages
• Classes
• Static diagrams
• Dynamic diagrams
Static Vs Dynamic
diagram
A stock control example
• Parts
– Its catalogue reference number (an integer).
– Its name (a string).
– The cost of an individual part (a floating point value).
• Assemblies
– parts
– Subassemblies
• query function that will find out the cost of the
materials in an assembly by adding up the costs
of all the parts it contains
CLASSES AND OBJECTS
• Class
• instance of the class
Object creation
OBJECT PROPERTIES
• State
• Behaviour
– Interface
• Identity
– unique identity
• Object names (UML)
• Encapsulation
– Class based form of encapsulation is weaker than
the object-based form
AVOIDING DATA REPLICATION
• Redundancy
• Maintenance
• catalogue information
– catalogue entry
LINKS
Object diagram
Class diagrams (ASSOCIATIONS)
• Links are instances of associations
• role name
• multiplicity constraint
MESSAGE PASSING
POLYMORPHISM
Implementation of polymorphism
• inheritance is used to implement
polymorphism
Polymorphism in UML
Abstract classes
• Classes like ‘Component’, which are
introduced primarily to specify relationships
between other classes in the model, and not
to support the creation of new types of
objects, are known as abstract classes
• In UML, this can be shown by writing the class
name in a slanting font
DYNAMIC BINDING
THE APPLICABILITY OF THE OBJECT
MODEL
• Close connection between the concepts of object
model & object-oriented programming languages
• some systems there is a fairly direct
correspondence between some of the real-world
objects being modeled and some of the software
objects
• But this analogy cannot be taken as a terribly
helpful guide to building object oriented systems
• overriding aims in designing software are to
produce systems that meet the users’
requirements, are easily maintainable, easy to
modify and reuse, and that make efficient use
of resources
– Ex. parts as part objects
• lead to significant problems of efficiency and
maintainability
• doubt as to whether it could meet the functional
requirements of the system
• message-passing mechanism used for communication
between objects in the object model does not seem to
represent accurately the way that many events happen
in the real world
• consider a situation where two people, not looking
where they are going, bump into each other
• It is very counterintuitive to think of this as a situation
where one of the people sends a ‘bump’ message to
the other
• Rather it seems that an event has taken place in which
each person is an equal and unintentional participant
• For this kind of reason, some object-oriented
analysis methods recommend modeling the real
world in terms of objects and events, and only
introduce messages relatively late on in the
design process
• Clearly there are cases where real-world objects,
and in particular agents, can be thought of as
sending messages to other objects
• Object oriented structure are more likely to
possess a number of desirable properties, such as
being easy to understand and maintain.
• In traditional procedural systems the data and the
functions that process the data are separated
• Object oriented approaches attempt to do is to
split up the data repository and integrate pieces
of data with the operations that directly
manipulate them
– significant technical advantages over more traditional
structures
– ease of understanding
SUMMARY
• Object-oriented modelling languages are based on an
abstract object model, which views a running system as
being a dynamic network of interacting objects.
• This model also provides an abstract interpretation of
the run-time properties of object oriented programs.
• Objects contain data and a set of operations to
manipulate that data.
• Every object is distinguishable from every other object,
irrespective of the data held or operations provided.
• These properties of objects are known as the state,
behaviour and identity of an object.
• A class describes a set of objects that share the
same structure and properties.
• These objects are known as the instances of the
class.
• Objects typically prevent external objects from
having access to their data, which is then said to
be encapsulated.
• Object diagrams show a set of objects, at run-
time, together with the links between them.
• Objects can be named, and the values of their
attributes can be shown.
• Objects co-operate by sending messages to other
objects.
• When an object receives a message it executes
one of its operations.
• Sending the same message to different objects
can result in different operations being executed.
• Interactions between objects, in the form of
messages, can be shown on object diagrams,
together with parameters and return values.
• Class diagrams provide an abstract summary of
the information shown on a set of object
diagrams.
• They show the same kind of information as is
typically found in a system’s source code.
• A rule of thumb that is often used in object-
oriented modelling is to base a design on the
objects found in the real world.
• The suitability of designs arrived at in this way
needs to be evaluated carefully, however.

More Related Content

Similar to MODELLING OBJECTS AND CLASSES

Object analysis and design
Object analysis and designObject analysis and design
Object analysis and designAnand Grewal
 
Object oriented analysis_and_design_v2.0
Object oriented analysis_and_design_v2.0Object oriented analysis_and_design_v2.0
Object oriented analysis_and_design_v2.0Ganapathi M
 
UML diagrams and symbols
UML diagrams and symbolsUML diagrams and symbols
UML diagrams and symbolsKumar
 
Objects and Classes.pptx
Objects and Classes.pptxObjects and Classes.pptx
Objects and Classes.pptxBalasundaramSr
 
Objects and Classes.pptx
Objects and Classes.pptxObjects and Classes.pptx
Objects and Classes.pptxBalasundaramSr
 
Objects and Classes BRIEF.pptx
Objects and Classes BRIEF.pptxObjects and Classes BRIEF.pptx
Objects and Classes BRIEF.pptxBalasundaramSr
 
Object-Oriented Systems Analysis and Design Using UML.pptx
Object-Oriented Systems Analysis and Design Using UML.pptxObject-Oriented Systems Analysis and Design Using UML.pptx
Object-Oriented Systems Analysis and Design Using UML.pptxXanGwaps
 
Concepts for Object Oriented Databases.ppt
Concepts for Object Oriented Databases.pptConcepts for Object Oriented Databases.ppt
Concepts for Object Oriented Databases.pptnafsigenet
 
IBM OOAD Part1 Summary
IBM OOAD Part1 SummaryIBM OOAD Part1 Summary
IBM OOAD Part1 SummaryHaitham Raik
 
Chapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfChapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfTamiratDejene1
 
Structural modeling and analysis
Structural modeling and analysisStructural modeling and analysis
Structural modeling and analysisJIGAR MAKHIJA
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxJasmineMichael1
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanPriyanka Pradhan
 

Similar to MODELLING OBJECTS AND CLASSES (20)

Object analysis and design
Object analysis and designObject analysis and design
Object analysis and design
 
Object oriented analysis_and_design_v2.0
Object oriented analysis_and_design_v2.0Object oriented analysis_and_design_v2.0
Object oriented analysis_and_design_v2.0
 
UML diagrams and symbols
UML diagrams and symbolsUML diagrams and symbols
UML diagrams and symbols
 
Objects and Classes.pptx
Objects and Classes.pptxObjects and Classes.pptx
Objects and Classes.pptx
 
Objects and Classes.pptx
Objects and Classes.pptxObjects and Classes.pptx
Objects and Classes.pptx
 
Objects and Classes BRIEF.pptx
Objects and Classes BRIEF.pptxObjects and Classes BRIEF.pptx
Objects and Classes BRIEF.pptx
 
07 intro2 oop
07 intro2 oop07 intro2 oop
07 intro2 oop
 
Database design
Database designDatabase design
Database design
 
Chapter 06
Chapter 06Chapter 06
Chapter 06
 
DATA MODELS.pptx
DATA MODELS.pptxDATA MODELS.pptx
DATA MODELS.pptx
 
Object-Oriented Systems Analysis and Design Using UML.pptx
Object-Oriented Systems Analysis and Design Using UML.pptxObject-Oriented Systems Analysis and Design Using UML.pptx
Object-Oriented Systems Analysis and Design Using UML.pptx
 
Concepts for Object Oriented Databases.ppt
Concepts for Object Oriented Databases.pptConcepts for Object Oriented Databases.ppt
Concepts for Object Oriented Databases.ppt
 
IBM OOAD Part1 Summary
IBM OOAD Part1 SummaryIBM OOAD Part1 Summary
IBM OOAD Part1 Summary
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Chapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfChapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdf
 
Structural modeling and analysis
Structural modeling and analysisStructural modeling and analysis
Structural modeling and analysis
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka Pradhan
 
OOP Presentation.pptx
OOP Presentation.pptxOOP Presentation.pptx
OOP Presentation.pptx
 
OOP Presentation.pptx
OOP Presentation.pptxOOP Presentation.pptx
OOP Presentation.pptx
 

Recently uploaded

Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 

Recently uploaded (20)

Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 

MODELLING OBJECTS AND CLASSES

  • 1. MODELLING WITH OBJECTS Reference: PRACTICAL OBJECT- ORIENTED DESIGN WITH UML, Mark Priestley
  • 2. • Objects • Links • Messages • Classes • Static diagrams • Dynamic diagrams
  • 4. A stock control example • Parts – Its catalogue reference number (an integer). – Its name (a string). – The cost of an individual part (a floating point value). • Assemblies – parts – Subassemblies • query function that will find out the cost of the materials in an assembly by adding up the costs of all the parts it contains
  • 5. CLASSES AND OBJECTS • Class • instance of the class
  • 6.
  • 7.
  • 9. OBJECT PROPERTIES • State • Behaviour – Interface • Identity – unique identity
  • 10. • Object names (UML) • Encapsulation – Class based form of encapsulation is weaker than the object-based form
  • 11. AVOIDING DATA REPLICATION • Redundancy • Maintenance • catalogue information – catalogue entry
  • 12.
  • 13. LINKS
  • 14.
  • 15.
  • 17. Class diagrams (ASSOCIATIONS) • Links are instances of associations • role name • multiplicity constraint
  • 19.
  • 21.
  • 22.
  • 23.
  • 24. Implementation of polymorphism • inheritance is used to implement polymorphism
  • 26.
  • 27. Abstract classes • Classes like ‘Component’, which are introduced primarily to specify relationships between other classes in the model, and not to support the creation of new types of objects, are known as abstract classes • In UML, this can be shown by writing the class name in a slanting font
  • 29.
  • 30. THE APPLICABILITY OF THE OBJECT MODEL • Close connection between the concepts of object model & object-oriented programming languages • some systems there is a fairly direct correspondence between some of the real-world objects being modeled and some of the software objects • But this analogy cannot be taken as a terribly helpful guide to building object oriented systems
  • 31. • overriding aims in designing software are to produce systems that meet the users’ requirements, are easily maintainable, easy to modify and reuse, and that make efficient use of resources – Ex. parts as part objects • lead to significant problems of efficiency and maintainability • doubt as to whether it could meet the functional requirements of the system
  • 32. • message-passing mechanism used for communication between objects in the object model does not seem to represent accurately the way that many events happen in the real world • consider a situation where two people, not looking where they are going, bump into each other • It is very counterintuitive to think of this as a situation where one of the people sends a ‘bump’ message to the other • Rather it seems that an event has taken place in which each person is an equal and unintentional participant
  • 33. • For this kind of reason, some object-oriented analysis methods recommend modeling the real world in terms of objects and events, and only introduce messages relatively late on in the design process • Clearly there are cases where real-world objects, and in particular agents, can be thought of as sending messages to other objects • Object oriented structure are more likely to possess a number of desirable properties, such as being easy to understand and maintain.
  • 34. • In traditional procedural systems the data and the functions that process the data are separated • Object oriented approaches attempt to do is to split up the data repository and integrate pieces of data with the operations that directly manipulate them – significant technical advantages over more traditional structures – ease of understanding
  • 35. SUMMARY • Object-oriented modelling languages are based on an abstract object model, which views a running system as being a dynamic network of interacting objects. • This model also provides an abstract interpretation of the run-time properties of object oriented programs. • Objects contain data and a set of operations to manipulate that data. • Every object is distinguishable from every other object, irrespective of the data held or operations provided. • These properties of objects are known as the state, behaviour and identity of an object.
  • 36. • A class describes a set of objects that share the same structure and properties. • These objects are known as the instances of the class. • Objects typically prevent external objects from having access to their data, which is then said to be encapsulated. • Object diagrams show a set of objects, at run- time, together with the links between them. • Objects can be named, and the values of their attributes can be shown.
  • 37. • Objects co-operate by sending messages to other objects. • When an object receives a message it executes one of its operations. • Sending the same message to different objects can result in different operations being executed. • Interactions between objects, in the form of messages, can be shown on object diagrams, together with parameters and return values.
  • 38. • Class diagrams provide an abstract summary of the information shown on a set of object diagrams. • They show the same kind of information as is typically found in a system’s source code. • A rule of thumb that is often used in object- oriented modelling is to base a design on the objects found in the real world. • The suitability of designs arrived at in this way needs to be evaluated carefully, however.