SlideShare a Scribd company logo
1 of 16
GENERAL OOPS
CONCEPTS
BASIC CONCEPTS OF OOP
 The OOP approach is based on
certain concepts that help it attain its
goal of overcoming the drawbacks or
short comings of convectional
programming approaches.
DATA ABSTRACTION
 Abstraction is the concept of simplifying
a real world concept into its essential
elements. To understand the
abstraction, let us take an example. You
are driving a car. You know essential
features to drive a car e.g. gear
handling, steering handling use of
clutch, accelerator, brakes etc. This is
abstraction where we only know the
essential things to drive a car without
including the background details or
ENCAPSULATION
 Encapsulation is the wrapping up of
the data and operations/
functions(that operate on the data)
into a single unit(called class).
 Encapsulation is the way to implement
data abstraction. Encapsulation hides
the details of the implementation of an
object.
MODULARITY
 Modularity is the property of a system
that has been decomposed into a set
of cohesive loosely coupled modules.
The justification for partioning a
program is that
 (i) It reduces its complexity to some
degree and
 (ii) It creates a number of well
defined, documented boundaries
within the program
INHERITANCE
 inheritance is the capability of one
class of things to inherit capabilities or
properties from another class. For e.g.
in scientific calculator it inherits the
features of simple calculator
too(addition, subtraction, multiplication
, division).
WHY INHERITANCE?
 The inheritance was introduced in OO
languages because
 It ensures the closeness with the real
world models.
 Inheritance allows the addition of
additional features to n existing class
without modifying it.
 Of its transitive nature. (if A inherits
from B and B inherits from C, then A
also inherits from C )
IS-A RELATIONSHIP
 This type of relationship is
represented via inheritance. When a
class(say B) inherits from another
class, (say A) it becomes a “a kind of”
its base class. That is, one can say
that class „B‟ IS-A kind of class „A‟.
E.g. A „car‟ IS-A vehicle.
HAS-A RELATIONSHIP
 In contract to inheritance, when a
class owns an object of another class
then it is class HAS-A relationship.
For e.g. car engine is an object of
class type and a class CAR owns
engine. i.e , car HAS-A ENGINE. But it
is not an engine. Thus no IS-A
relationship, just HAS-A relationship.
This relationship is also called
composition or containership.
Polymorphism
 Polymorphism is the ability for a
message or data to be processed in
more than one form . Languages that
support classes but not polymorphism
are called object-based languages.
Ada is such a language.
 Polymorphism is a property by which
the same message can be send to
objects of several different
classes, when each object can
respond in a different way depending
upon it class.
Advantages and disadvantages
of OOP
 Advantages
 Re-use of code. Linking of code to
object and explicit specification of
relations between objects allows
related objects to share code.
Encapsulation allows class definitions
to be re-used in other application. The
availability of a consistent interface to
objects lessens code duplication and
thereby improves code reusability
 Ease of comprehension: the classes can
be set up to closely represent the generic
application concepts and processes. OOP
codes are more near to real-world models
than other programming methodologies‟
codes.
 Ease of fabrication and maintenance:
The concepts such as
encapsulation, data abstraction allow
for every clean designs. When an
object is going into disallows
states, which are not permitted, only
its methods need be investigated e.g.
if student is getting more than
maximum marks, only the functions
are to be retested. This narrows down
search for problems.
 Easy redesign and extension: the
same concepts above facilitate easy
redesign and extension.
Disadvantages of OOP
 With OOP, classes tend to be overly
generalized.
 The relations among classes become
artificial at times.
 The OOP programs‟ design is tricky.
 Also one need to do proper planning
and design for OOP programming.
 To program with OOP, programmer need
proper skills such as design skills,
programming skills, thinking in terms of
objects etc.

More Related Content

What's hot

Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
thinkphp
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Language
dheva B
 

What's hot (20)

Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4Oops concept in c++ unit 3 -topic 4
Oops concept in c++ unit 3 -topic 4
 
2 Object Oriented Programming
2 Object Oriented Programming2 Object Oriented Programming
2 Object Oriented Programming
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Object Oriented Concepts and Principles
Object Oriented Concepts and PrinciplesObject Oriented Concepts and Principles
Object Oriented Concepts and Principles
 
Object oriented programming concept
Object oriented programming conceptObject oriented programming concept
Object oriented programming concept
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
concept of oops
concept of oopsconcept of oops
concept of oops
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
Oop concept
Oop conceptOop concept
Oop concept
 
General OOP Concepts
General OOP ConceptsGeneral OOP Concepts
General OOP Concepts
 
Oops
OopsOops
Oops
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Language
 
Object Oriented Concepts in Real Projects
Object Oriented Concepts in Real ProjectsObject Oriented Concepts in Real Projects
Object Oriented Concepts in Real Projects
 
OOPS Characteristics
OOPS CharacteristicsOOPS Characteristics
OOPS Characteristics
 
Oo ps concepts in c++
Oo ps concepts in c++Oo ps concepts in c++
Oo ps concepts in c++
 
Object Oriented Concept
Object Oriented ConceptObject Oriented Concept
Object Oriented Concept
 
Oops
OopsOops
Oops
 
object oriented programing lecture 1
object oriented programing lecture 1object oriented programing lecture 1
object oriented programing lecture 1
 
Oops
OopsOops
Oops
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 

Viewers also liked

Viewers also liked (11)

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
 
SystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummarySystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features Summary
 
Oop basic overview
Oop basic overviewOop basic overview
Oop basic overview
 
Oop concepts
Oop conceptsOop concepts
Oop concepts
 
Object Orinted Programing(OOP) concepts \
Object Orinted Programing(OOP) concepts \Object Orinted Programing(OOP) concepts \
Object Orinted Programing(OOP) concepts \
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programming
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Constructor ppt
Constructor pptConstructor ppt
Constructor ppt
 

Similar to General oops concepts

Similar to General oops concepts (20)

Java OOPS Concept
Java OOPS ConceptJava OOPS Concept
Java OOPS Concept
 
1 intro
1 intro1 intro
1 intro
 
Chapter 04 object oriented programming
Chapter 04 object oriented programmingChapter 04 object oriented programming
Chapter 04 object oriented programming
 
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
 
Advance oops concepts
Advance oops conceptsAdvance oops concepts
Advance oops concepts
 
OOPS ABAP.docx
OOPS ABAP.docxOOPS ABAP.docx
OOPS ABAP.docx
 
oopsinvb-191021101327.pdf
oopsinvb-191021101327.pdfoopsinvb-191021101327.pdf
oopsinvb-191021101327.pdf
 
Oops in vb
Oops in vbOops in vb
Oops in vb
 
Java OOPs Concepts.docx
Java OOPs Concepts.docxJava OOPs Concepts.docx
Java OOPs Concepts.docx
 
Fundamentals of oops in .Net
Fundamentals of oops in .NetFundamentals of oops in .Net
Fundamentals of oops in .Net
 
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
 
Cble assignment powerpoint activity for moodle 1
Cble assignment powerpoint activity for moodle 1Cble assignment powerpoint activity for moodle 1
Cble assignment powerpoint activity for moodle 1
 
Seminar
SeminarSeminar
Seminar
 
Java pdf
Java   pdfJava   pdf
Java pdf
 
Object oriented programing
Object oriented programingObject oriented programing
Object oriented programing
 
OOP interview questions & answers.
OOP interview questions & answers.OOP interview questions & answers.
OOP interview questions & answers.
 
C#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developersC#.net interview questions for dynamics 365 ce crm developers
C#.net interview questions for dynamics 365 ce crm developers
 
MCA NOTES.pdf
MCA NOTES.pdfMCA NOTES.pdf
MCA NOTES.pdf
 
Object Interconnections
Object InterconnectionsObject Interconnections
Object Interconnections
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

General oops concepts

  • 2. BASIC CONCEPTS OF OOP  The OOP approach is based on certain concepts that help it attain its goal of overcoming the drawbacks or short comings of convectional programming approaches.
  • 3. DATA ABSTRACTION  Abstraction is the concept of simplifying a real world concept into its essential elements. To understand the abstraction, let us take an example. You are driving a car. You know essential features to drive a car e.g. gear handling, steering handling use of clutch, accelerator, brakes etc. This is abstraction where we only know the essential things to drive a car without including the background details or
  • 4. ENCAPSULATION  Encapsulation is the wrapping up of the data and operations/ functions(that operate on the data) into a single unit(called class).  Encapsulation is the way to implement data abstraction. Encapsulation hides the details of the implementation of an object.
  • 5.
  • 6. MODULARITY  Modularity is the property of a system that has been decomposed into a set of cohesive loosely coupled modules. The justification for partioning a program is that  (i) It reduces its complexity to some degree and  (ii) It creates a number of well defined, documented boundaries within the program
  • 7. INHERITANCE  inheritance is the capability of one class of things to inherit capabilities or properties from another class. For e.g. in scientific calculator it inherits the features of simple calculator too(addition, subtraction, multiplication , division).
  • 8. WHY INHERITANCE?  The inheritance was introduced in OO languages because  It ensures the closeness with the real world models.  Inheritance allows the addition of additional features to n existing class without modifying it.  Of its transitive nature. (if A inherits from B and B inherits from C, then A also inherits from C )
  • 9. IS-A RELATIONSHIP  This type of relationship is represented via inheritance. When a class(say B) inherits from another class, (say A) it becomes a “a kind of” its base class. That is, one can say that class „B‟ IS-A kind of class „A‟. E.g. A „car‟ IS-A vehicle.
  • 10. HAS-A RELATIONSHIP  In contract to inheritance, when a class owns an object of another class then it is class HAS-A relationship. For e.g. car engine is an object of class type and a class CAR owns engine. i.e , car HAS-A ENGINE. But it is not an engine. Thus no IS-A relationship, just HAS-A relationship. This relationship is also called composition or containership.
  • 11. Polymorphism  Polymorphism is the ability for a message or data to be processed in more than one form . Languages that support classes but not polymorphism are called object-based languages. Ada is such a language.  Polymorphism is a property by which the same message can be send to objects of several different classes, when each object can respond in a different way depending upon it class.
  • 12. Advantages and disadvantages of OOP  Advantages  Re-use of code. Linking of code to object and explicit specification of relations between objects allows related objects to share code. Encapsulation allows class definitions to be re-used in other application. The availability of a consistent interface to objects lessens code duplication and thereby improves code reusability
  • 13.  Ease of comprehension: the classes can be set up to closely represent the generic application concepts and processes. OOP codes are more near to real-world models than other programming methodologies‟ codes.
  • 14.  Ease of fabrication and maintenance: The concepts such as encapsulation, data abstraction allow for every clean designs. When an object is going into disallows states, which are not permitted, only its methods need be investigated e.g. if student is getting more than maximum marks, only the functions are to be retested. This narrows down search for problems.
  • 15.  Easy redesign and extension: the same concepts above facilitate easy redesign and extension.
  • 16. Disadvantages of OOP  With OOP, classes tend to be overly generalized.  The relations among classes become artificial at times.  The OOP programs‟ design is tricky.  Also one need to do proper planning and design for OOP programming.  To program with OOP, programmer need proper skills such as design skills, programming skills, thinking in terms of objects etc.