SlideShare a Scribd company logo
OBJECT-ORIENTED
CONCEPTS

1
What is an object?




An object is a software entity that mirrors the real
world in some way.
A software object in OOP has data (the attributes) and
code that responds to instructions. Think of the code
and data as being welded together --the code
completely wrapping the data in a shell to protect it
from the hostile outside world." [Franz]

2
What is an object?
(Continued)




”An object has state, behavior, and identity;
[Booch 91]
“An object is an encapsulation of state (data
values) and behavior (operations). Thus an
object is in many ways similar to a module, or
an abstract data type." [Budd]

3
Procedural languages vs Objectoriented languages?


Procedural languages (Pascal, C, Fortran,
etc.) operate on data a step at a time. A
program written in one of these languages has
two components:
 data

(variables and records)
 code (instructions that act on the data and do the
work).
There is a rigid separation of code from data.

4
PRO-Lang vs OO-Lang
(Continued)


An object-oriented language breaks a
program into hundreds of tiny entities that
have small bits of code and data fused tightly
together. Where subroutines are a
convenience in a procedural language, the
separateness of these entities is essential to an
object-oriented program.

5
OBJECT-ORIENTATION - A NEW
PARADIGM




Object-oriented programming is a new
programming paradigm (a new way of
viewing the world).
The underlying ideas of the object-oriented
technique are the same basic methods humans
use to solve problems in the world (e.g.,
abstraction).

6
OO A NEW PARADIGM
(Continued)


Computer novices and children grasp the
ideas of OOP easier than computer
professionals. The professionals require a
paradigm shift which is very difficult (due to
preconceived notions) whereas the children
don't.

7
TERMS:





Object: A software entity that mirrors the
real world in some way. Everything in an
object-oriented programming language is an
object.
Class: A class is a template from which
objects are created (i.e., a blueprint for the
objects it defines). Every object made from a
class is the same as every other.
8
TERMS:
(Continued)




Instance: Instances are the individual
objects created by a class. Every object is an
instance of a class.
Related Term:
Instantiation: Creating a new (specific)
object from a general class is called
instantiation.

9
TERMS:
(Continued)


Method: The behavior of a class, and all its
instances, is described by a method.
Methods are like procedures:






They execute step-by-step,
Can do branching and looping,
Take arguments,
Have local variables,
Return values (objects).

10
TERMS:
(Continued)


Methods are unlike procedures:


they may only access data of the class for which they
are defined, an instance's data can only be accessed
through
its class' method.

Note: A class' methods completely
encapsulate the data of objects of the class for
which they are defined.

11
TERMS:
(Continued)


Message: A request to a specific instance,
called the receiver, to invoke a specific
method. Along with the name of the method,
(the selector) additional information
(arguments, i.e., objects) can be passed as
part of the message.

12
TERMS:
(Continued)


When the object receives the message, it
invokes the method for the selector. This can:
(1) change the object's instance variables,
(2) send another object back as a direct
response to the message,
(3) do something in the real world of the
computer, such as display information, print a
message, or read a block of data from a file.

Much of the code within methods consists
of passing messages to other objects.
13
TERMS:
(Continued)




Abstraction: A problem solving
tool that allows one to think of a
problem at a higher level without
worrying about the details.
Abstraction refers to organizing
information based on three
abstraction mechanisms:
classification, generalization,
and aggregation.
14
ABSTRACTION MECHANISMS
(Continued)


Classification forms new objects by
suppressing the details of individual
instances and emphasizing properties of the
whole. New object types (classes) are
formed by collecting instances.

Classification = set theoretic operation 'membership'
==> describes the 'instance-of' relationship

15
ABSTRACTION MECHANISMS
(Continued)
EX: Classification would allow one to collect
the instances '{Jane, Bob, Sue}' into a new
higher-order type called 'secretary.'

16
ABSTRACTION MECHANISMS
(Continued)


Generalization merges existing types to form
new types. Individual differences between
subtypes are ignored and common traits are
emphasized.
Generalization = set theoretic operation
'union'
==> describes the 'is-a‘ relationship

17
ABSTRACTION MECHANISMS
(Continued)
EX: Existing employee types 'secretary', and
'teacher' can be generalized to form the new
type 'employee'.

18
ABSTRACTION MECHANISMS
(Continued)
Generalization implies that every instance of
the subtype is an instance of the type. Every
instance of 'teacher' is also an instance of
'employee'

19
ABSTRACTION MECHANISMS
(Continued)


Aggregation forms an object as a relationship
among other objects. It suppresses the details
of the components and emphasizes the details
of the relationship as a whole.
Aggregation = set theoretic operation
'cartesian product'
==> describes the 'is-part-of‘ relationship

20
ABSTRACTION MECHANISMS
(Continued)
EX: Consider object types 'stove',
'refrigerator', 'sink', 'cabinet'. A 'kitchen'
object can be abstracted from the given
objects. The individual objects (e.g., 'stove')
are components of the aggregate ('kitchen').

21
ABSTRACTION MECHANISMS
(Continued)
An instance of a component is said to be an
attribute of an instance of the aggregate.

22
ABSTRACTION MECHANISMS
(Continued)


Classification, generalization, and
aggregation are the basic ways we have of
structuring information. When they are
repeatedly applied to objects, hierarchies of
new objects are formed.

23
TERMS:
(Continued)




Information hiding as defined by Parnas [Par72]
suggests decomposing systems into components that
hide or encapsulate design decisions about
abstractions.
Data abstraction refers to defining data types in
terms of the operations that apply to objects of the
type, with the constraint that the values of such
objects can be modified and observed only by the use
of the operations [Oxf86].

24
TERMS:
(Continued)




Data abstraction is thinking in terms of what
you can do to a collection of data
independently of how you do it.
Related term:
Abstract data type (ADT) is a collection of
data structured in a particular fashion
together with a set of operations that
manipulate the data.
25
TERMS:
(Continued)




Inheritance: The principle of receiving
properties or characteristics from an ancestor
and is used to define new data types as
extensions or restrictions of existing types.
Polymorphism and dynamic binding:
Program entities should be permitted to refer
to objects of more than one class, and
operations should be permitted to have
different realizations in different classes.
26
TERMS:
(Continued)
o

o

Polymorphism: refers to the situation
whereby a given program entity may refer at
run-time to instances of different classes.
Dynamic binding: refers to the situation
whereby the run-time system will
automatically select the version of an
operation adapted to the corresponding
instance.
27
TERMS:
(Continued)


Multiple and repeated inheritance: It should
be possible to declare a class as heir to more
than one class, and more than once to the
same class.

28

More Related Content

PPTX
Basic concept of Object Oriented Programming
PPT
1207028 634528828886611250
PPTX
Object database standards, languages and design
PPTX
Encapsulation of operations, methods & persistence
PDF
Ijarcet vol-2-issue-4-1363-1367
PPTX
Object oriented database model
PPTX
Object oriented programming concept
PPTX
Object oriented modeling
Basic concept of Object Oriented Programming
1207028 634528828886611250
Object database standards, languages and design
Encapsulation of operations, methods & persistence
Ijarcet vol-2-issue-4-1363-1367
Object oriented database model
Object oriented programming concept
Object oriented modeling

What's hot (20)

PPTX
Object oriented data model
PPTX
Class and object 1
PPTX
Oo ps concepts in c++
PPTX
Object oriented database concepts
PPTX
C++ with student management system project
PPT
2 lesson 2 object oriented programming in c++
DOC
Domain vs. (Data) Type, Class vs. Relation
PPTX
Chapter 3
PPTX
Basic concept of oops
PPTX
Chapter 7 java
PPT
PDF
Database Management Systems Tutorial
PPTX
encapsulation
PDF
Lo10
PPTX
Object Oriented Principles
PPT
Oop concept
PPTX
General oops concepts
Object oriented data model
Class and object 1
Oo ps concepts in c++
Object oriented database concepts
C++ with student management system project
2 lesson 2 object oriented programming in c++
Domain vs. (Data) Type, Class vs. Relation
Chapter 3
Basic concept of oops
Chapter 7 java
Database Management Systems Tutorial
encapsulation
Lo10
Object Oriented Principles
Oop concept
General oops concepts
Ad

Viewers also liked (20)

PDF
Museum Review- 1920's Pacifc Islands Collection at Cincinnati Museum Center -...
PPTX
Basuras en lugares especificos
PPT
References expose 2016
PDF
Museum Pest, Exhibition & Storage Examples From CMC Pacific Islands Collection
PDF
Museum Review of Kentucky State School for Deaf, KSD, Danville, KY JenniferH...
PPTX
Productos
PPT
ã¶äÿRetmen nasä±l olmali uygulama2014
PPTX
Creating Shareable content
DOC
Bilal akbaş 8
PPTX
Codes and conventions
PDF
City Architecture & Civil Engineering As Art, Long Island
PPTX
Nursing informatic'spresentation
PDF
Excerpts from the Giving Tree
PPTX
Wellness apps and gadgets
PPT
Clichés de Jean Ledocq sur le thème Art Image de 2016
PPTX
What the Tech Can't You Do!?
PPTX
New Networks and Workflow @UofSLibrary
PPT
Maubeuge jl 2016 ppt
PPTX
Managing your Drupal project with Composer
PPTX
Payday Loans 300
Museum Review- 1920's Pacifc Islands Collection at Cincinnati Museum Center -...
Basuras en lugares especificos
References expose 2016
Museum Pest, Exhibition & Storage Examples From CMC Pacific Islands Collection
Museum Review of Kentucky State School for Deaf, KSD, Danville, KY JenniferH...
Productos
ã¶äÿRetmen nasä±l olmali uygulama2014
Creating Shareable content
Bilal akbaş 8
Codes and conventions
City Architecture & Civil Engineering As Art, Long Island
Nursing informatic'spresentation
Excerpts from the Giving Tree
Wellness apps and gadgets
Clichés de Jean Ledocq sur le thème Art Image de 2016
What the Tech Can't You Do!?
New Networks and Workflow @UofSLibrary
Maubeuge jl 2016 ppt
Managing your Drupal project with Composer
Payday Loans 300
Ad

Similar to Object oriented concepts (20)

PDF
SE18_Lec 06_Object Oriented Analysis and Design
PDF
SE_Lec 06_Object Oriented Analysis and Design
PPTX
INTRODUCTION AND BASIC CONCEPT OF OOAD.pptx
PPTX
chapterOne.pptxFSdgfqdzwwfagxgghvkjljhcxCZZXvcbx
PDF
Java chapter 3
PPTX
OOSD Lecture 1-1.pptx FOR ENGINEERING STUDENTS
PPT
General OOP concept [by-Digvijay]
PPTX
OOSD1-unit1_1_16_09.pptx
PPTX
OOAD unit1 introduction to object orientation
PDF
Abap object-oriented-programming-tutorials
PPT
Basic Java Concept - Practical Oriented Methodologies
PPT
Oops slide
PPTX
Analyzing a system and specifying the requirements
PDF
LEARNING CONTEXT FOR TEXT.pdf
PPTX
Object Oriented Programming Concepts Using C++
PPTX
Advance oops concepts
PPTX
object oriented programming and methodology.pptx
PDF
Bt8901 objective oriented systems1
PDF
SE18_Lec 06_Object Oriented Analysis and Design
SE_Lec 06_Object Oriented Analysis and Design
INTRODUCTION AND BASIC CONCEPT OF OOAD.pptx
chapterOne.pptxFSdgfqdzwwfagxgghvkjljhcxCZZXvcbx
Java chapter 3
OOSD Lecture 1-1.pptx FOR ENGINEERING STUDENTS
General OOP concept [by-Digvijay]
OOSD1-unit1_1_16_09.pptx
OOAD unit1 introduction to object orientation
Abap object-oriented-programming-tutorials
Basic Java Concept - Practical Oriented Methodologies
Oops slide
Analyzing a system and specifying the requirements
LEARNING CONTEXT FOR TEXT.pdf
Object Oriented Programming Concepts Using C++
Advance oops concepts
object oriented programming and methodology.pptx
Bt8901 objective oriented systems1

Recently uploaded (20)

PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Classroom Observation Tools for Teachers
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Cell Structure & Organelles in detailed.
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
TR - Agricultural Crops Production NC III.pdf
Classroom Observation Tools for Teachers
Pharma ospi slides which help in ospi learning
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Computing-Curriculum for Schools in Ghana
Renaissance Architecture: A Journey from Faith to Humanism
VCE English Exam - Section C Student Revision Booklet
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPH.pptx obstetrics and gynecology in nursing
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Supply Chain Operations Speaking Notes -ICLT Program
Final Presentation General Medicine 03-08-2024.pptx
human mycosis Human fungal infections are called human mycosis..pptx
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
FourierSeries-QuestionsWithAnswers(Part-A).pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Cell Structure & Organelles in detailed.
102 student loan defaulters named and shamed – Is someone you know on the list?

Object oriented concepts

  • 2. What is an object?   An object is a software entity that mirrors the real world in some way. A software object in OOP has data (the attributes) and code that responds to instructions. Think of the code and data as being welded together --the code completely wrapping the data in a shell to protect it from the hostile outside world." [Franz] 2
  • 3. What is an object? (Continued)   ”An object has state, behavior, and identity; [Booch 91] “An object is an encapsulation of state (data values) and behavior (operations). Thus an object is in many ways similar to a module, or an abstract data type." [Budd] 3
  • 4. Procedural languages vs Objectoriented languages?  Procedural languages (Pascal, C, Fortran, etc.) operate on data a step at a time. A program written in one of these languages has two components:  data (variables and records)  code (instructions that act on the data and do the work). There is a rigid separation of code from data. 4
  • 5. PRO-Lang vs OO-Lang (Continued)  An object-oriented language breaks a program into hundreds of tiny entities that have small bits of code and data fused tightly together. Where subroutines are a convenience in a procedural language, the separateness of these entities is essential to an object-oriented program. 5
  • 6. OBJECT-ORIENTATION - A NEW PARADIGM   Object-oriented programming is a new programming paradigm (a new way of viewing the world). The underlying ideas of the object-oriented technique are the same basic methods humans use to solve problems in the world (e.g., abstraction). 6
  • 7. OO A NEW PARADIGM (Continued)  Computer novices and children grasp the ideas of OOP easier than computer professionals. The professionals require a paradigm shift which is very difficult (due to preconceived notions) whereas the children don't. 7
  • 8. TERMS:   Object: A software entity that mirrors the real world in some way. Everything in an object-oriented programming language is an object. Class: A class is a template from which objects are created (i.e., a blueprint for the objects it defines). Every object made from a class is the same as every other. 8
  • 9. TERMS: (Continued)   Instance: Instances are the individual objects created by a class. Every object is an instance of a class. Related Term: Instantiation: Creating a new (specific) object from a general class is called instantiation. 9
  • 10. TERMS: (Continued)  Method: The behavior of a class, and all its instances, is described by a method. Methods are like procedures:      They execute step-by-step, Can do branching and looping, Take arguments, Have local variables, Return values (objects). 10
  • 11. TERMS: (Continued)  Methods are unlike procedures:  they may only access data of the class for which they are defined, an instance's data can only be accessed through its class' method. Note: A class' methods completely encapsulate the data of objects of the class for which they are defined. 11
  • 12. TERMS: (Continued)  Message: A request to a specific instance, called the receiver, to invoke a specific method. Along with the name of the method, (the selector) additional information (arguments, i.e., objects) can be passed as part of the message. 12
  • 13. TERMS: (Continued)  When the object receives the message, it invokes the method for the selector. This can: (1) change the object's instance variables, (2) send another object back as a direct response to the message, (3) do something in the real world of the computer, such as display information, print a message, or read a block of data from a file. Much of the code within methods consists of passing messages to other objects. 13
  • 14. TERMS: (Continued)   Abstraction: A problem solving tool that allows one to think of a problem at a higher level without worrying about the details. Abstraction refers to organizing information based on three abstraction mechanisms: classification, generalization, and aggregation. 14
  • 15. ABSTRACTION MECHANISMS (Continued)  Classification forms new objects by suppressing the details of individual instances and emphasizing properties of the whole. New object types (classes) are formed by collecting instances. Classification = set theoretic operation 'membership' ==> describes the 'instance-of' relationship 15
  • 16. ABSTRACTION MECHANISMS (Continued) EX: Classification would allow one to collect the instances '{Jane, Bob, Sue}' into a new higher-order type called 'secretary.' 16
  • 17. ABSTRACTION MECHANISMS (Continued)  Generalization merges existing types to form new types. Individual differences between subtypes are ignored and common traits are emphasized. Generalization = set theoretic operation 'union' ==> describes the 'is-a‘ relationship 17
  • 18. ABSTRACTION MECHANISMS (Continued) EX: Existing employee types 'secretary', and 'teacher' can be generalized to form the new type 'employee'. 18
  • 19. ABSTRACTION MECHANISMS (Continued) Generalization implies that every instance of the subtype is an instance of the type. Every instance of 'teacher' is also an instance of 'employee' 19
  • 20. ABSTRACTION MECHANISMS (Continued)  Aggregation forms an object as a relationship among other objects. It suppresses the details of the components and emphasizes the details of the relationship as a whole. Aggregation = set theoretic operation 'cartesian product' ==> describes the 'is-part-of‘ relationship 20
  • 21. ABSTRACTION MECHANISMS (Continued) EX: Consider object types 'stove', 'refrigerator', 'sink', 'cabinet'. A 'kitchen' object can be abstracted from the given objects. The individual objects (e.g., 'stove') are components of the aggregate ('kitchen'). 21
  • 22. ABSTRACTION MECHANISMS (Continued) An instance of a component is said to be an attribute of an instance of the aggregate. 22
  • 23. ABSTRACTION MECHANISMS (Continued)  Classification, generalization, and aggregation are the basic ways we have of structuring information. When they are repeatedly applied to objects, hierarchies of new objects are formed. 23
  • 24. TERMS: (Continued)   Information hiding as defined by Parnas [Par72] suggests decomposing systems into components that hide or encapsulate design decisions about abstractions. Data abstraction refers to defining data types in terms of the operations that apply to objects of the type, with the constraint that the values of such objects can be modified and observed only by the use of the operations [Oxf86]. 24
  • 25. TERMS: (Continued)   Data abstraction is thinking in terms of what you can do to a collection of data independently of how you do it. Related term: Abstract data type (ADT) is a collection of data structured in a particular fashion together with a set of operations that manipulate the data. 25
  • 26. TERMS: (Continued)   Inheritance: The principle of receiving properties or characteristics from an ancestor and is used to define new data types as extensions or restrictions of existing types. Polymorphism and dynamic binding: Program entities should be permitted to refer to objects of more than one class, and operations should be permitted to have different realizations in different classes. 26
  • 27. TERMS: (Continued) o o Polymorphism: refers to the situation whereby a given program entity may refer at run-time to instances of different classes. Dynamic binding: refers to the situation whereby the run-time system will automatically select the version of an operation adapted to the corresponding instance. 27
  • 28. TERMS: (Continued)  Multiple and repeated inheritance: It should be possible to declare a class as heir to more than one class, and more than once to the same class. 28