SlideShare ist ein Scribd-Unternehmen logo
1 von 14
BASIC CONCEPTS OF
       OOPS
Difference between Object Oriented Programming and
             Procedural Programming?



 Object Oriented Programming          Procedural Programming
• Emphasis on Data                    •Emphasis on doing things (functions)
• Follows Bottom-Up approach in       •Follows Top-down approach in program
  program design                      design
• Data hiding feature prevents        •Presence of Global variables increase
  accidental change in data           chances of accidental change in data
• Features like data encapsulation,   •Such features are not available
  polymorphism, inheritance are
  present
Object oriented features
•   Objects
•   Classes
•   Data Abstraction
•   Data Encapsulation
•   Inheritance
•   Polymorphism
•   Overloading
•   Reusability
Objects:
• Object is the basic unit of object-oriented
  programming. Objects are identified by its
  unique name.
• An object represents a particular instance
  of a class..
An Object is a collection of data members and associated
      member functions also known as methods.
Classes

• Classes are data types based on which
  objects are created.
• Thus a Class represent a set of individual
  objects. Characteristics of an object are
  represented in a class as Properties. The
  actions that can be performed by objects
  becomes functions of the class and is
  referred to as Methods.
Data Abstraction

• Data Abstraction increases the power of
  programming language by creating user
  defined data types.
• Data Abstraction also represents the
  needed information in the program without
  presenting the details.
Data Encapsulation
• Data Encapsulation combines data and
  functions into a single unit called Class.
• Data Encapsulation enables the important
  concept of data hiding possible.
• Data Encapsulation:
   Wrapping up of data and functions together in a single
   unit is known as Data Encapsulation. In a class, we
  wrap up the data and functions together in a single unit.

• Data Hiding:
    Keeping the data in private visibility mode of the class
  to prevent it from accidental change is known as Data
  Hiding.

class Computer              Data hiding
{
char CPU[10];int RAM;
public:                              Data Encapsulation
void STOCK();
void SHOW();
};
Inheritance
• Inheritance is the process of forming a new class
  from an existing class or base class. The base
  class is also known as parent class or super
  class, The new class that is formed is called
  derived class.
• Derived class is also known as a child class or
  sub class. Inheritance helps in reducing the
  overall code size of the program, which is an
  important concept in object-oriented
  programming.
Features or Advantages of Inheritance

• Reusability:
• Inheritance helps the code to be reused in many situations.
• The base class is defined and once it is compiled, it need not be
  reworked.
• Using the concept of inheritance, the programmer can create as
  many derived classes from the base class as needed while adding
  specific features to each derived class as needed.

• Saves Time and Effort:
• The above concept of reusability achieved by inheritance saves the
  programmer time and effort.
• the main code written can be reused in various situations as
  needed.

• Increases Program Structure which results in greater reliability.
Polymorphism
• Polymorphism allows routines to use
  variables of different types at different
  times.
• An operator or function can be given
  different meanings or functions.
• Polymorphism refers to a single function
  or multi-functioning operator performing in
  different ways.
Overloading

• Overloading is one type of Polymorphism.
• It allows an object to have different
  meanings, depending on its context.
• When an exiting operator or function
  begins to operate on new data type, or
  class, it is understood to be overloaded.
Reusability

• This term refers to the ability for multiple
  programmers to use the same written and
  debugged existing class of data.
• The programmer can incorporate new
  features to the existing class, further
  developing the application and allowing
  users to achieve increased performance.

Weitere ähnliche Inhalte

Was ist angesagt?

Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
Alok Kumar
 
1 unit (oops)
1 unit (oops)1 unit (oops)
1 unit (oops)
Jay Patel
 
Introduction to oop
Introduction to oop Introduction to oop
Introduction to oop
Kumar
 
Introduction to object oriented language
Introduction to object oriented languageIntroduction to object oriented language
Introduction to object oriented language
farhan amjad
 

Was ist angesagt? (20)

Object Oriented Programming Using C++
Object Oriented Programming Using C++Object Oriented Programming Using C++
Object Oriented Programming Using C++
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)Fundamentals of OOP (Object Oriented Programming)
Fundamentals of OOP (Object Oriented Programming)
 
Characteristics of OOPS
Characteristics of OOPS Characteristics of OOPS
Characteristics of OOPS
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
 
C++ OOPS Concept
C++ OOPS ConceptC++ OOPS Concept
C++ OOPS Concept
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
 
1 unit (oops)
1 unit (oops)1 unit (oops)
1 unit (oops)
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
OOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOPOOP - Benefits and advantages of OOP
OOP - Benefits and advantages of OOP
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
object oriented programing lecture 1
object oriented programing lecture 1object oriented programing lecture 1
object oriented programing lecture 1
 
Introduction to c++ ppt
Introduction to c++ pptIntroduction to c++ ppt
Introduction to c++ ppt
 
Introduction to oop
Introduction to oop Introduction to oop
Introduction to oop
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
 
Introduction to object oriented language
Introduction to object oriented languageIntroduction to object oriented language
Introduction to object oriented language
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Advance oops concepts
Advance oops conceptsAdvance oops concepts
Advance oops concepts
 

Ähnlich wie Basic concepts of oops

1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf
SahajShrimal1
 

Ähnlich wie Basic concepts of oops (20)

Principles of OOPs.pptx
Principles of OOPs.pptxPrinciples of OOPs.pptx
Principles of OOPs.pptx
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Oop.pptx
Oop.pptxOop.pptx
Oop.pptx
 
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
1. OBJECT ORIENTED PROGRAMMING USING JAVA - OOps Concepts.ppt
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP concepts
 
OOP-1.pptx
OOP-1.pptxOOP-1.pptx
OOP-1.pptx
 
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptx
 
Basic Concepts of Object Oriented Programming using C++
Basic Concepts of Object Oriented Programming using C++Basic Concepts of Object Oriented Programming using C++
Basic Concepts of Object Oriented Programming using C++
 
Programming language paradigms
Programming language paradigmsProgramming language paradigms
Programming language paradigms
 
Oop ppt
Oop pptOop ppt
Oop ppt
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
Introduction to Java -unit-1
Introduction to Java -unit-1Introduction to Java -unit-1
Introduction to Java -unit-1
 
Object Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft DeveloperObject Oriented Programming Overview for the PeopleSoft Developer
Object Oriented Programming Overview for the PeopleSoft Developer
 
1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf1unit-120324103142-phpapp02.pdf
1unit-120324103142-phpapp02.pdf
 
Java_notes.ppt
Java_notes.pptJava_notes.ppt
Java_notes.ppt
 
Oop basic overview
Oop basic overviewOop basic overview
Oop basic overview
 
SE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTSE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPT
 
PHP OOP Lecture - 01.pptx
PHP OOP Lecture - 01.pptxPHP OOP Lecture - 01.pptx
PHP OOP Lecture - 01.pptx
 
Questpond - Top 10 Interview Questions and Answers on OOPS
Questpond - Top 10 Interview Questions and Answers on OOPSQuestpond - Top 10 Interview Questions and Answers on OOPS
Questpond - Top 10 Interview Questions and Answers on OOPS
 

Kürzlich hochgeladen

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Kürzlich hochgeladen (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
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
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
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
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 

Basic concepts of oops

  • 2. Difference between Object Oriented Programming and Procedural Programming? Object Oriented Programming Procedural Programming • Emphasis on Data •Emphasis on doing things (functions) • Follows Bottom-Up approach in •Follows Top-down approach in program program design design • Data hiding feature prevents •Presence of Global variables increase accidental change in data chances of accidental change in data • Features like data encapsulation, •Such features are not available polymorphism, inheritance are present
  • 3. Object oriented features • Objects • Classes • Data Abstraction • Data Encapsulation • Inheritance • Polymorphism • Overloading • Reusability
  • 4. Objects: • Object is the basic unit of object-oriented programming. Objects are identified by its unique name. • An object represents a particular instance of a class..
  • 5. An Object is a collection of data members and associated member functions also known as methods.
  • 6. Classes • Classes are data types based on which objects are created. • Thus a Class represent a set of individual objects. Characteristics of an object are represented in a class as Properties. The actions that can be performed by objects becomes functions of the class and is referred to as Methods.
  • 7. Data Abstraction • Data Abstraction increases the power of programming language by creating user defined data types. • Data Abstraction also represents the needed information in the program without presenting the details.
  • 8. Data Encapsulation • Data Encapsulation combines data and functions into a single unit called Class. • Data Encapsulation enables the important concept of data hiding possible.
  • 9. • Data Encapsulation: Wrapping up of data and functions together in a single unit is known as Data Encapsulation. In a class, we wrap up the data and functions together in a single unit. • Data Hiding: Keeping the data in private visibility mode of the class to prevent it from accidental change is known as Data Hiding. class Computer Data hiding { char CPU[10];int RAM; public: Data Encapsulation void STOCK(); void SHOW(); };
  • 10. Inheritance • Inheritance is the process of forming a new class from an existing class or base class. The base class is also known as parent class or super class, The new class that is formed is called derived class. • Derived class is also known as a child class or sub class. Inheritance helps in reducing the overall code size of the program, which is an important concept in object-oriented programming.
  • 11. Features or Advantages of Inheritance • Reusability: • Inheritance helps the code to be reused in many situations. • The base class is defined and once it is compiled, it need not be reworked. • Using the concept of inheritance, the programmer can create as many derived classes from the base class as needed while adding specific features to each derived class as needed. • Saves Time and Effort: • The above concept of reusability achieved by inheritance saves the programmer time and effort. • the main code written can be reused in various situations as needed. • Increases Program Structure which results in greater reliability.
  • 12. Polymorphism • Polymorphism allows routines to use variables of different types at different times. • An operator or function can be given different meanings or functions. • Polymorphism refers to a single function or multi-functioning operator performing in different ways.
  • 13. Overloading • Overloading is one type of Polymorphism. • It allows an object to have different meanings, depending on its context. • When an exiting operator or function begins to operate on new data type, or class, it is understood to be overloaded.
  • 14. Reusability • This term refers to the ability for multiple programmers to use the same written and debugged existing class of data. • The programmer can incorporate new features to the existing class, further developing the application and allowing users to achieve increased performance.