SlideShare ist ein Scribd-Unternehmen logo
1 von 17
GENERAL OOP
CONCEPT
BY:

DIGVIJAY SINGH KARAKOTI
INTRODUCTION
With the rapidly changing world and the highly competitive and
versatile nature of industry, the operations are becoming more
and more complex.
In view of the increasing complexity of software systems, the
software industry and software engineer continuously look for the
new approaches to software design and development. The most
adopted and popular programming approach, structured
programming approach, failed to show the desired results in terms
of bug-free, easy-to-maintain, and reusable programs.
The latest programming approach, Object-oriented programming
(OOP), offers a new and powerful way to cope with this
complexity. Its goal is clearer, more reliable, more easily
maintained programs.
THE OBJECT-ORIENTED
PROGRAMMING

Object-oriented programming is the most recent concept among
programming paradigms and still different things to different
people.
“Object-oriented programming is an approach that provides a way of

modularizing programs by creating partitioned memory area for both
data and functions that can be used as templates for creating copies of
such modules on demand.”
That is, an object is considered to be a partitioned area of computer
memory that stores data and set of operations that can access that
data. Since the memory partitions are independent, the objects can be
used in a variety of different programs without modifications.
BASIC CONCEPTS OF OOP
OBJECTS
Object is an identifiable entity with some characteristics
and behavior.
They may represent a person, a place, a bank
account, a table of data or any item that the
program must handle.
Fig.: Object representation

They may also represent user-defined data such
as vectors, time and lists.
Each object contains data and code to manipulate
the data.
CLASSES
A Class is a template/blue-print representing a group of
objects that share common properties and
relationships.
A class is thus a collection of objects of similar type.
For instance:- mango, apple and orange are members of the
class fruit.

Fig.: Class representation
DATA ENCAPSULATION
The wrapping up of data and functions into a single unit (called class)
is known as Encapsulation.
Data encapsulation is the most striking feature of a
class.
The data is not accessible to the outside world
and only those functions which are wrapped in the
class can access it. These functions provide the interface between the
object’s data and the program.
This insulation of the data from direct access by the
program is called Data hiding.
DATA ABSTRACTION

Abstraction refers to the act of representing essential
features without including the background details or
explanations.
Classes use the concept of abstraction and are
defined as a list of abstract attributes such as size,
weight and cost, and functions to operate on these
attributes.
They encapsulate all the essential
properties of the objects that are to be created.
Since the classes use the concept of data abstraction,
they are known as Abstract Data Type(ADT)
INHERITANCE
Inheritance is the process by which objects of one
class acquire the properties of objects of another
class. It supports the concept of hierarchical
classification.
Inheritance provides the idea of reusability. This
means that we can add additional features to an
existing class without modifying it.
This is possible by
deriving a new class from the existing one.
The new class will have the combined features of both
the classes.
Bird
Attributes:
Feathers
Lay eggs

Flying bird

Non-flying

Attributes:

Robin
Attributes:

Fig.: Property
Fig.: Property
Inheritance
Inheritance

Swallow
Attributes:

Penguin
Attributes:

bird
Attributes:

Kiwi
Attributes:
POLYMORPHISM
Polymorphism is another important OOP concept.
Polymorphism means the ability to take more
than one form.
For instance: consider the operation of addition.
For
two numbers, the operation will generate a sum. If
the operands are strings, then the operation would
produce a third string by concatenation.
Polymorphism is extremely used in implementing
Shape
Draw( )

Circle
object
Draw(circle)

Box
object
Draw(box )

Triangle

object
Draw(triangle)
DYNAMIC BINDING

Binding refers to the linking of a procedure call to the
code to be executed in response to the call.
Dynamic binding means that the code associated with
a given procedure call is not known until the time of
the call at run-time.
It is associated with polymorphism and inheritance.
A function call associated with a polymorphic reference
depends on the dynamic type of that reference.
Shape
Draw( )

Circle
object
Draw(circle)

Box
object
Draw(box )

Triangle

object
Draw(triangle)

By inheritance, every object will have this procedure. Its algorithm is, however, unique to each
By inheritance, every object will have this procedure. Its algorithm is, however, unique to each
object and so the draw procedure will be redefined in each class that defines the object.
object and so the draw procedure will be redefined in each class that defines the object.
At run-time, the code matching the object under current reference will be called.
At run-time, the code matching the object under current reference will be called.
MESSAGE COMMUNICATION
An object-oriented program consists of a set of objects that communicate with each
other. The process of programming in an object-oriented language therefore
involves
the following basic steps:
(1) Creating classes that define objects and their
behavior.
(2) Creating objects from class definitions.
(3) Establishing communication among objects.
Objects communicate with one another by sending and receiving information much
the same way as people pass messages to one another. The concept of message
passing makes it easier to talk about building systems that directly model or
simulate
their real-world counterparts.
A message for an object is a request for execution of a procedure, and therefore will
invoke a function (procedure) in the receiving object, that generates the desired
result.
Message passing involves specifying the name of the object, the name of the
employees

salary

object

(name);

information

message

Objects have a life cycle.
Objects have a life cycle.
They can be created and destroyed.
They can be created and destroyed.
Communication with an object is feasible as long as it is alive.
Communication with an object is feasible as long as it is alive.
General OOP concept [by-Digvijay]

Weitere ähnliche Inhalte

Was ist angesagt?

Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
thinkphp
 

Was ist angesagt? (20)

OOP
OOPOOP
OOP
 
2 Object Oriented Programming
2 Object Oriented Programming2 Object Oriented Programming
2 Object Oriented Programming
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Oops concepts
Oops conceptsOops concepts
Oops concepts
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Object oriented programming concept
Object oriented programming conceptObject oriented programming concept
Object oriented programming concept
 
Object Oriented Concepts and Principles
Object Oriented Concepts and PrinciplesObject Oriented Concepts and Principles
Object Oriented Concepts and Principles
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
Concepts of oops
Concepts of oopsConcepts of oops
Concepts of oops
 
concept of oops
concept of oopsconcept of oops
concept of oops
 
Oops
OopsOops
Oops
 
Oop concepts classes_objects
Oop concepts classes_objectsOop concepts classes_objects
Oop concepts classes_objects
 
Basic Concepts Of OOPS/OOPS in Java,C++
Basic Concepts Of OOPS/OOPS in Java,C++Basic Concepts Of OOPS/OOPS in Java,C++
Basic Concepts Of OOPS/OOPS in Java,C++
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Oops
OopsOops
Oops
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
Oo ps concepts in c++
Oo ps concepts in c++Oo ps concepts in c++
Oo ps concepts in c++
 
Introduction to oop
Introduction to oopIntroduction to oop
Introduction to oop
 
Object oriented programming concepts
Object oriented programming conceptsObject oriented programming concepts
Object oriented programming concepts
 

Andere mochten auch

Classes, objects in JAVA
Classes, objects in JAVAClasses, objects in JAVA
Classes, objects in JAVA
Abhilash Nair
 

Andere mochten auch (20)

Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programming
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Object Orinted Programing(OOP) concepts \
Object Orinted Programing(OOP) concepts \Object Orinted Programing(OOP) concepts \
Object Orinted Programing(OOP) concepts \
 
Oops ppt
Oops pptOops ppt
Oops ppt
 
Oop concepts
Oop conceptsOop concepts
Oop concepts
 
Introduction to class in java
Introduction to class in javaIntroduction to class in java
Introduction to class in java
 
Classes, objects in JAVA
Classes, objects in JAVAClasses, objects in JAVA
Classes, objects in JAVA
 
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
 
General OOP Concepts
General OOP ConceptsGeneral OOP Concepts
General OOP Concepts
 
Object oreinted php | OOPs
Object oreinted php | OOPsObject oreinted php | OOPs
Object oreinted php | OOPs
 
Beginners Guide to Object Orientation in PHP
Beginners Guide to Object Orientation in PHPBeginners Guide to Object Orientation in PHP
Beginners Guide to Object Orientation in PHP
 
Oops
OopsOops
Oops
 
Parameterized Constructor
Parameterized ConstructorParameterized Constructor
Parameterized Constructor
 
03. oop concepts
03. oop concepts03. oop concepts
03. oop concepts
 
OOP Basic
OOP BasicOOP Basic
OOP Basic
 
Oop design principles
Oop design principlesOop design principles
Oop design principles
 
java Oops.ppt
java Oops.pptjava Oops.ppt
java Oops.ppt
 
SystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummarySystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features Summary
 
Chapter1 Introduction to OOP (Java)
Chapter1 Introduction to OOP (Java)Chapter1 Introduction to OOP (Java)
Chapter1 Introduction to OOP (Java)
 
Functional Programing
Functional ProgramingFunctional Programing
Functional Programing
 

Ähnlich wie General OOP concept [by-Digvijay]

Ähnlich wie General OOP concept [by-Digvijay] (20)

Chapter1
Chapter1Chapter1
Chapter1
 
Java chapter 3
Java   chapter 3Java   chapter 3
Java chapter 3
 
Java pdf
Java   pdfJava   pdf
Java pdf
 
Object oriented programming C++
Object oriented programming C++Object oriented programming C++
Object oriented programming C++
 
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptxOBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
 
MCA NOTES.pdf
MCA NOTES.pdfMCA NOTES.pdf
MCA NOTES.pdf
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 
Principles of oop
Principles of oopPrinciples of oop
Principles of oop
 
chapter - 1.ppt
chapter - 1.pptchapter - 1.ppt
chapter - 1.ppt
 
POP vs OOP Introduction
POP vs OOP IntroductionPOP vs OOP Introduction
POP vs OOP Introduction
 
Advance oops concepts
Advance oops conceptsAdvance oops concepts
Advance oops concepts
 
1 intro
1 intro1 intro
1 intro
 
M.c.a. (sem iv)- java programming
M.c.a. (sem   iv)- java programmingM.c.a. (sem   iv)- java programming
M.c.a. (sem iv)- java programming
 
Oops slide
Oops slide Oops slide
Oops slide
 
Basic concept of oops
Basic concept of oopsBasic concept of oops
Basic concept of oops
 
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
Java Progamming Paradigms, OOPS Concept, Introduction to Java, Structure of J...
 
Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1 Java Programming Paradigms Chapter 1
Java Programming Paradigms Chapter 1
 
Chapter1 introduction
Chapter1 introductionChapter1 introduction
Chapter1 introduction
 
Unit 5.ppt
Unit 5.pptUnit 5.ppt
Unit 5.ppt
 
SE18_Lec 06_Object Oriented Analysis and Design
SE18_Lec 06_Object Oriented Analysis and DesignSE18_Lec 06_Object Oriented Analysis and Design
SE18_Lec 06_Object Oriented Analysis and Design
 

Mehr von Digvijay Singh Karakoti (8)

Inheritance in C++
Inheritance in C++Inheritance in C++
Inheritance in C++
 
Computer Hardware Basics (Components to be understand)
Computer Hardware Basics (Components to be understand)Computer Hardware Basics (Components to be understand)
Computer Hardware Basics (Components to be understand)
 
Digital signature
Digital signatureDigital signature
Digital signature
 
Simon’s model for Decision Making Process
Simon’s model for Decision Making ProcessSimon’s model for Decision Making Process
Simon’s model for Decision Making Process
 
Operations Research-2nd edition
Operations Research-2nd editionOperations Research-2nd edition
Operations Research-2nd edition
 
Data structure by Digvijay
Data structure by DigvijayData structure by Digvijay
Data structure by Digvijay
 
Root Of The Equations [By- Digvijay]
Root Of The Equations [By- Digvijay]Root Of The Equations [By- Digvijay]
Root Of The Equations [By- Digvijay]
 
DMA presentation [By- Digvijay]
DMA presentation [By- Digvijay]DMA presentation [By- Digvijay]
DMA presentation [By- Digvijay]
 

Kürzlich hochgeladen

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Kürzlich hochgeladen (20)

Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 

General OOP concept [by-Digvijay]

  • 2. INTRODUCTION With the rapidly changing world and the highly competitive and versatile nature of industry, the operations are becoming more and more complex. In view of the increasing complexity of software systems, the software industry and software engineer continuously look for the new approaches to software design and development. The most adopted and popular programming approach, structured programming approach, failed to show the desired results in terms of bug-free, easy-to-maintain, and reusable programs. The latest programming approach, Object-oriented programming (OOP), offers a new and powerful way to cope with this complexity. Its goal is clearer, more reliable, more easily maintained programs.
  • 3. THE OBJECT-ORIENTED PROGRAMMING Object-oriented programming is the most recent concept among programming paradigms and still different things to different people. “Object-oriented programming is an approach that provides a way of modularizing programs by creating partitioned memory area for both data and functions that can be used as templates for creating copies of such modules on demand.” That is, an object is considered to be a partitioned area of computer memory that stores data and set of operations that can access that data. Since the memory partitions are independent, the objects can be used in a variety of different programs without modifications.
  • 5. OBJECTS Object is an identifiable entity with some characteristics and behavior. They may represent a person, a place, a bank account, a table of data or any item that the program must handle. Fig.: Object representation They may also represent user-defined data such as vectors, time and lists. Each object contains data and code to manipulate the data.
  • 6. CLASSES A Class is a template/blue-print representing a group of objects that share common properties and relationships. A class is thus a collection of objects of similar type. For instance:- mango, apple and orange are members of the class fruit. Fig.: Class representation
  • 7. DATA ENCAPSULATION The wrapping up of data and functions into a single unit (called class) is known as Encapsulation. Data encapsulation is the most striking feature of a class. The data is not accessible to the outside world and only those functions which are wrapped in the class can access it. These functions provide the interface between the object’s data and the program. This insulation of the data from direct access by the program is called Data hiding.
  • 8. DATA ABSTRACTION Abstraction refers to the act of representing essential features without including the background details or explanations. Classes use the concept of abstraction and are defined as a list of abstract attributes such as size, weight and cost, and functions to operate on these attributes. They encapsulate all the essential properties of the objects that are to be created. Since the classes use the concept of data abstraction, they are known as Abstract Data Type(ADT)
  • 9. INHERITANCE Inheritance is the process by which objects of one class acquire the properties of objects of another class. It supports the concept of hierarchical classification. Inheritance provides the idea of reusability. This means that we can add additional features to an existing class without modifying it. This is possible by deriving a new class from the existing one. The new class will have the combined features of both the classes.
  • 10. Bird Attributes: Feathers Lay eggs Flying bird Non-flying Attributes: Robin Attributes: Fig.: Property Fig.: Property Inheritance Inheritance Swallow Attributes: Penguin Attributes: bird Attributes: Kiwi Attributes:
  • 11. POLYMORPHISM Polymorphism is another important OOP concept. Polymorphism means the ability to take more than one form. For instance: consider the operation of addition. For two numbers, the operation will generate a sum. If the operands are strings, then the operation would produce a third string by concatenation. Polymorphism is extremely used in implementing
  • 13. DYNAMIC BINDING Binding refers to the linking of a procedure call to the code to be executed in response to the call. Dynamic binding means that the code associated with a given procedure call is not known until the time of the call at run-time. It is associated with polymorphism and inheritance. A function call associated with a polymorphic reference depends on the dynamic type of that reference.
  • 14. Shape Draw( ) Circle object Draw(circle) Box object Draw(box ) Triangle object Draw(triangle) By inheritance, every object will have this procedure. Its algorithm is, however, unique to each By inheritance, every object will have this procedure. Its algorithm is, however, unique to each object and so the draw procedure will be redefined in each class that defines the object. object and so the draw procedure will be redefined in each class that defines the object. At run-time, the code matching the object under current reference will be called. At run-time, the code matching the object under current reference will be called.
  • 15. MESSAGE COMMUNICATION An object-oriented program consists of a set of objects that communicate with each other. The process of programming in an object-oriented language therefore involves the following basic steps: (1) Creating classes that define objects and their behavior. (2) Creating objects from class definitions. (3) Establishing communication among objects. Objects communicate with one another by sending and receiving information much the same way as people pass messages to one another. The concept of message passing makes it easier to talk about building systems that directly model or simulate their real-world counterparts. A message for an object is a request for execution of a procedure, and therefore will invoke a function (procedure) in the receiving object, that generates the desired result. Message passing involves specifying the name of the object, the name of the
  • 16. employees salary object (name); information message Objects have a life cycle. Objects have a life cycle. They can be created and destroyed. They can be created and destroyed. Communication with an object is feasible as long as it is alive. Communication with an object is feasible as long as it is alive.