SlideShare uma empresa Scribd logo
1 de 16
Object Oriented Programming
With C++
Principles and advantages of oop
CONCEPTS OF OOP
• Class
• object
• Inheritance
• Abstraction
• Encapsulation
• Polymorphism
CLASS
• A class is a collection of objects of similar type.
• Example:-
mango, apple and orange are members of the
class fruit.
• Classes are user-defined data type and built-
in type of a programming language.
• fruit mango:
will create an object mango belonging to the
class fruit
OBJECT
• Object are the basic run time entity in an
object –oriented system.
• They may represent a person, a place, a bank
account, a table of data or any item that
program has handle.
Example of objects
OBJECT: emp
DATA :
Emp_no
Name
Age
Salary
FUNCTIONS :
Getdata (input)
Total (find total
salary)
Display (output)
INHERITANCE
 It is the capability of one class to inherit
properties from another class.
5 types of inheritance
 Single level
 Multilevel
 Multiple
 Hierarchical
 Hybrid
Single level inheritance
Base classFlower
Rose Derived class
Single level
Multi level inheritance
Base class
Rajasthan
Jaipur
World
India
Multi level
Multiple inheritance
Bird
Parrot Sparrow
Multiple
inheritance
Base class
Derived class
ABSTRACTION
Definition- The act of representing essential
features without including the background details
or explanations.
• Classes uses the concept of abstraction and are
defined list of abstract attributes.
• The attributes are sometime called as data
members because they hold information.
• The function that operates on these data are
sometimes called methods or member function.
ENCAPSULATION
• Definition :- The wrapping up of data and
functions into a single unit.
• Data encapsulation is the most striking
feature of class.
• Encapsulation means that some or all of an
object's internal structure is "hidden" from
the outside world.
POLYMORPHISM
•polymorphism is the ability of objects of
different types to respond to functions of
the same name.
Types of polymorphism
• Virtual functions.
• Operator overloading.
• Function overloading.
ADVANTAGES OF OOP
• Through inheritance, we can eliminate code and
extend the use of existing classes.
• Reusability.
• Easy to understand.
• Models the real world well.
• The principle of data hiding helps the programmer to
build secure programs.
• Software complexity can be easily managed.
• It is essay to partition the work in a project based on
object.
• Software complexity can be easily managed.
• Object –oriented system can be easily upgraded from
small to large system.
Principles and advantages of oop ppt

Mais conteúdo relacionado

Mais procurados

Data types in python
Data types in pythonData types in python
Data types in pythonRaginiJain21
 
Class and object in C++
Class and object in C++Class and object in C++
Class and object in C++rprajat007
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Michelle Anne Meralpis
 
Classes and objects
Classes and objectsClasses and objects
Classes and objectsNilesh Dalvi
 
Classes, objects in JAVA
Classes, objects in JAVAClasses, objects in JAVA
Classes, objects in JAVAAbhilash Nair
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops conceptsNilesh Dalvi
 
object oriented Programming ppt
object oriented Programming pptobject oriented Programming ppt
object oriented Programming pptNitesh Dubey
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++Paumil Patel
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++Ankur Pandey
 
Introduction to oop
Introduction to oop Introduction to oop
Introduction to oop Kumar
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructorsNilesh Dalvi
 
Constructor and Destructor
Constructor and DestructorConstructor and Destructor
Constructor and DestructorKamal Acharya
 
Object Oriented Programming Concepts for beginners
Object Oriented Programming Concepts for beginners Object Oriented Programming Concepts for beginners
Object Oriented Programming Concepts for beginners Vibhawa Nirmal
 
class and objects
class and objectsclass and objects
class and objectsPayel Guria
 
Object Oriented Programming Using C++
Object Oriented Programming Using C++Object Oriented Programming Using C++
Object Oriented Programming Using C++Muhammad Waqas
 
Java basics and java variables
Java basics and java variablesJava basics and java variables
Java basics and java variablesPushpendra Tyagi
 

Mais procurados (20)

Data types in python
Data types in pythonData types in python
Data types in python
 
Class and object in C++
Class and object in C++Class and object in C++
Class and object in C++
 
OOPS Basics With Example
OOPS Basics With ExampleOOPS Basics With Example
OOPS Basics With Example
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
 
Classes, objects in JAVA
Classes, objects in JAVAClasses, objects in JAVA
Classes, objects in JAVA
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
 
object oriented Programming ppt
object oriented Programming pptobject oriented Programming ppt
object oriented Programming ppt
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
Polymorphism in java
Polymorphism in javaPolymorphism in java
Polymorphism in java
 
Introduction to oop
Introduction to oop Introduction to oop
Introduction to oop
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructors
 
Constructor and Destructor
Constructor and DestructorConstructor and Destructor
Constructor and Destructor
 
Object Oriented Programming Concepts for beginners
Object Oriented Programming Concepts for beginners Object Oriented Programming Concepts for beginners
Object Oriented Programming Concepts for beginners
 
Oops
OopsOops
Oops
 
class and objects
class and objectsclass and objects
class and objects
 
Object Oriented Programming Using C++
Object Oriented Programming Using C++Object Oriented Programming Using C++
Object Oriented Programming Using C++
 
Java basics and java variables
Java basics and java variablesJava basics and java variables
Java basics and java variables
 
Basic concept of OOP's
Basic concept of OOP'sBasic concept of OOP's
Basic concept of OOP's
 

Destaque

Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...cprogrammings
 

Destaque (6)

Encapsulation C++
Encapsulation C++Encapsulation C++
Encapsulation C++
 
inheritance c++
inheritance c++inheritance c++
inheritance c++
 
encapsulation
encapsulationencapsulation
encapsulation
 
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
Inheritance in c++ ppt (Powerpoint) | inheritance in c++ ppt presentation | i...
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
 
Inheritance
InheritanceInheritance
Inheritance
 

Semelhante a Principles and advantages of oop ppt

SKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPTSKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPTSkillwise Group
 
Object oriented programming 6 oop with c++
Object oriented programming 6  oop with c++Object oriented programming 6  oop with c++
Object oriented programming 6 oop with c++Vaibhav Khanna
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP conceptsAhmed Farag
 
Introduction to oop and java fundamentals
Introduction to oop and java fundamentalsIntroduction to oop and java fundamentals
Introduction to oop and java fundamentalsAnsgarMary
 
1 unit (oops)
1 unit (oops)1 unit (oops)
1 unit (oops)Jay Patel
 
U1 JAVA.pptx
U1 JAVA.pptxU1 JAVA.pptx
U1 JAVA.pptxmadan r
 
Need of object oriented programming
Need of object oriented programmingNeed of object oriented programming
Need of object oriented programmingAmar Jukuntla
 
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 OOPSgdrealspace
 
L1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdfL1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdfBhanuJatinSingh
 
Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Nuzhat Memon
 
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptxYashKoli22
 
Oops and c fundamentals
Oops and c fundamentals Oops and c fundamentals
Oops and c fundamentals umesh patil
 
Core java lessons
Core java lessonsCore java lessons
Core java lessonsvivek shah
 
Concepts of OOPs
Concepts of OOPsConcepts of OOPs
Concepts of OOPsEssay Corp
 
C++ in object oriented programming
C++ in object oriented programmingC++ in object oriented programming
C++ in object oriented programmingSaket Khopkar
 

Semelhante a Principles and advantages of oop ppt (20)

SKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPTSKILLWISE - OOPS CONCEPT
SKILLWISE - OOPS CONCEPT
 
Object oriented programming 6 oop with c++
Object oriented programming 6  oop with c++Object oriented programming 6  oop with c++
Object oriented programming 6 oop with c++
 
Basic concepts of oops
Basic concepts of oopsBasic concepts of oops
Basic concepts of oops
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Principles of OOPs.pptx
Principles of OOPs.pptxPrinciples of OOPs.pptx
Principles of OOPs.pptx
 
Introduction to OOP concepts
Introduction to OOP conceptsIntroduction to OOP concepts
Introduction to OOP concepts
 
Introduction to oop and java fundamentals
Introduction to oop and java fundamentalsIntroduction to oop and java fundamentals
Introduction to oop and java fundamentals
 
oop.pptx
oop.pptxoop.pptx
oop.pptx
 
1 unit (oops)
1 unit (oops)1 unit (oops)
1 unit (oops)
 
U1 JAVA.pptx
U1 JAVA.pptxU1 JAVA.pptx
U1 JAVA.pptx
 
Need of object oriented programming
Need of object oriented programmingNeed of object oriented programming
Need of object oriented programming
 
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
 
L1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdfL1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdf
 
Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)
 
Concepts of oop1
Concepts of oop1Concepts of oop1
Concepts of oop1
 
CPP-Unit 1.pptx
CPP-Unit 1.pptxCPP-Unit 1.pptx
CPP-Unit 1.pptx
 
Oops and c fundamentals
Oops and c fundamentals Oops and c fundamentals
Oops and c fundamentals
 
Core java lessons
Core java lessonsCore java lessons
Core java lessons
 
Concepts of OOPs
Concepts of OOPsConcepts of OOPs
Concepts of OOPs
 
C++ in object oriented programming
C++ in object oriented programmingC++ in object oriented programming
C++ in object oriented programming
 

Mais de daxesh chauhan

Rsa and diffie hellman algorithms
Rsa and diffie hellman algorithmsRsa and diffie hellman algorithms
Rsa and diffie hellman algorithmsdaxesh chauhan
 
Elastic beam (bending of beam model)
Elastic beam (bending of beam model)Elastic beam (bending of beam model)
Elastic beam (bending of beam model)daxesh chauhan
 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalizationdaxesh chauhan
 
Insertionsort shellsort heapsort
Insertionsort shellsort heapsortInsertionsort shellsort heapsort
Insertionsort shellsort heapsortdaxesh chauhan
 
COMBINATIONAL PLD-BASED STATE MACHINES
COMBINATIONAL PLD-BASED STATE MACHINESCOMBINATIONAL PLD-BASED STATE MACHINES
COMBINATIONAL PLD-BASED STATE MACHINESdaxesh chauhan
 
Input - output organzation
Input - output organzationInput - output organzation
Input - output organzationdaxesh chauhan
 

Mais de daxesh chauhan (7)

Rsa and diffie hellman algorithms
Rsa and diffie hellman algorithmsRsa and diffie hellman algorithms
Rsa and diffie hellman algorithms
 
Elastic beam (bending of beam model)
Elastic beam (bending of beam model)Elastic beam (bending of beam model)
Elastic beam (bending of beam model)
 
Functional dependencies and normalization
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalization
 
Insertionsort shellsort heapsort
Insertionsort shellsort heapsortInsertionsort shellsort heapsort
Insertionsort shellsort heapsort
 
COMBINATIONAL PLD-BASED STATE MACHINES
COMBINATIONAL PLD-BASED STATE MACHINESCOMBINATIONAL PLD-BASED STATE MACHINES
COMBINATIONAL PLD-BASED STATE MACHINES
 
Cn ppt
Cn  pptCn  ppt
Cn ppt
 
Input - output organzation
Input - output organzationInput - output organzation
Input - output organzation
 

Último

CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfBalamuruganV28
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptxmohitesoham12
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Sumanth A
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfisabel213075
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Romil Mishra
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书rnrncn29
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfDrew Moseley
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxStephen Sitton
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming languageSmritiSharma901052
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTSneha Padhiar
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewsandhya757531
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHSneha Padhiar
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Communityprachaibot
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfalene1
 

Último (20)

CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptx
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdf
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdf
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptx
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
OOP concepts -in-Python programming language
OOP concepts -in-Python programming languageOOP concepts -in-Python programming language
OOP concepts -in-Python programming language
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overview
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Community
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
 

Principles and advantages of oop ppt

  • 1. Object Oriented Programming With C++ Principles and advantages of oop
  • 2. CONCEPTS OF OOP • Class • object • Inheritance • Abstraction • Encapsulation • Polymorphism
  • 3. CLASS • A class is a collection of objects of similar type. • Example:- mango, apple and orange are members of the class fruit. • Classes are user-defined data type and built- in type of a programming language. • fruit mango: will create an object mango belonging to the class fruit
  • 4. OBJECT • Object are the basic run time entity in an object –oriented system. • They may represent a person, a place, a bank account, a table of data or any item that program has handle.
  • 5. Example of objects OBJECT: emp DATA : Emp_no Name Age Salary FUNCTIONS : Getdata (input) Total (find total salary) Display (output)
  • 6. INHERITANCE  It is the capability of one class to inherit properties from another class. 5 types of inheritance  Single level  Multilevel  Multiple  Hierarchical  Hybrid
  • 7. Single level inheritance Base classFlower Rose Derived class Single level
  • 8. Multi level inheritance Base class Rajasthan Jaipur World India Multi level
  • 10. ABSTRACTION Definition- The act of representing essential features without including the background details or explanations. • Classes uses the concept of abstraction and are defined list of abstract attributes. • The attributes are sometime called as data members because they hold information. • The function that operates on these data are sometimes called methods or member function.
  • 11. ENCAPSULATION • Definition :- The wrapping up of data and functions into a single unit. • Data encapsulation is the most striking feature of class. • Encapsulation means that some or all of an object's internal structure is "hidden" from the outside world.
  • 12. POLYMORPHISM •polymorphism is the ability of objects of different types to respond to functions of the same name.
  • 13. Types of polymorphism • Virtual functions. • Operator overloading. • Function overloading.
  • 14. ADVANTAGES OF OOP • Through inheritance, we can eliminate code and extend the use of existing classes. • Reusability. • Easy to understand. • Models the real world well. • The principle of data hiding helps the programmer to build secure programs. • Software complexity can be easily managed.
  • 15. • It is essay to partition the work in a project based on object. • Software complexity can be easily managed. • Object –oriented system can be easily upgraded from small to large system.