SlideShare a Scribd company logo
1 of 17
OOP
(Object Oriented Programming)
https://htree.plus/
Presented By,
Nisarg Raval
Kadam Parikh
Kishan Sakariya
Ria Jain
What is OOP & 4-pillar?
❏ Object-oriented programming
(OOP) is a programming language
model in which programs are
organized around data, or objects,
rather than functions and logic.
https://htree.plus/
Encapsulation
Inheritance
Polymorphism AbstractionOOP
(4-pillar)
https://htree.plus/
Inheritance
❏ Concepts at higher levels are more general.
❏ Concepts at lower levels are more specific (inherit properties of
concepts at higher levels)
Vehicle
Wheeled Vehicle Boat
Car Bicycle
Inheritance
(By Programming)
https://htree.plus/
❏ The language mechanism by which one class acquires the
properties (data and operations) of another class
❏ Base Class (or superclass): the class being inherited from
❏ Derived Class (or subclass): the class that inherits
https://htree.plus/
❏ You can reuse the methods and data of the existing class
❏ You can extend the existing class by adding new data and new
methods
❏ You can modify the existing class by overloading its methods
with your own implementations
Advantages Of Inheritance
https://htree.plus/
Abstraction
❏ Objects in an OOP language provide an abstraction that hides
the internal implementation details.
❏ Abstraction refers to the concept of hiding the complexities of
a system from the users of that system
Abstraction
(Real World Example)
● For example, the coffee machine in your kitchen, you just
need to know which methods of the object are available to
call and which input parameters are needed to trigger a
specific operation. But you don’t need to understand how
this method is implemented and which kinds of actions it
has to perform to create the expected result.
Abstraction
(By Programming)
using namespace std;
class implementAbstraction
{
private:
int a, b;
public:
// method to set values of
// private members
void set(int x, int y)
{
a = x;
b = y;
}
void display()
{
cout<<"a = " <<a << endl;
cout<<"b = " << b << endl;
}
};
int main()
{
implementAbstraction obj;
obj.set(10, 20);
obj.display();
return 0;
}
https://htree.plus/
Encapsulation
❏ Encapsulation is a process of combining
data members and functions in a single
unit called class.
https://htree.plus/
Encapsulation
(Example)
❏ using System;
❏ namespace OPPs {
❏ class Encapsulation {
❏ private string Name = "Alex";
❏ public string EmployeeName { // Property
❏ get {
❏ return Name;
❏ }
❏ set {
❏ Name = value;
❏ }
❏ }
❏ static void Main(string[] args) {
❏ string Name2 = string.Empty;
❏ // use properties
❏ Encapsulation e = new Encapsulation();
❏ Name2 = e.EmployeeName;
❏ Console.WriteLine("Employee Name: " + Name2);
❏ Console.ReadLine();
❏ }
❏ }
❏ }
https://htree.plus/
Advantages Of
Encapsulation & Abstraction
❏ Encapsulation helps us in binding the data(instance
variables) and the member functions(that work on the
instance variables) of a class.
❏ Abstraction helps the user to avoid writing the low level code
❏ Abstraction avoids code duplication and increases
reusability.
❏ Abstraction can change internal implementation of class
independently without affecting the user.
https://htree.plus/
Polymorphism
(By Real World Example)
● The word ‘polymorphism’ literally means ‘a state of having
many shapes’ or ‘the capacity to take on different forms’.
https://htree.plus/
Polymorphism
(By Programming)
❏ Two types of polymorphism :
- Dynamic Polymorphism
- Static Polymorphism
❏ The process of binding the overloaded method within object at
compile time is known as Static polymorphism
❏ In dynamic polymorphism method of the program binds with
an object at runtime
https://htree.plus/
Polymorphism
(By Progamming)
https://htree.plus/
Advantages Of Polymorphism
❏ It helps programmers reuse the code and classes once written,
tested and implemented. They can be reused in many ways.
❏ Single variable name can be used to store variables of multiple
data types(Float, double, Long, Int etc).
❏ Polymorphism helps in reducing the coupling between
different functionalities.
References
❏ https://medium.com/omarelgabrys-blog/the-story-of-object-oriented-programming-
12d1901a1825
❏ https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html
❏ http://cs.smu.ca/~porter/csc/465/notes/oop.html
❏ https://atomicobject.com/resources/oo-programming/oo-quality
❏ https://medium.com/from-the-scratch/oop-everything-you-need-to-know-about-object-
oriented-programming-aee3c18e281b
❏ https://www.javatpoint.com/java-oops-concepts
❏ https://tomassetti.me/oops-concepts/
❏ http://www.differencebetween.net/technology/difference-between-oop-and-pop/
❏ https://en.wikipedia.org/wiki/Object-oriented_programming
❏ https://en.wikipedia.org/wiki/Access_modifiers
https://htree.plus/
THANK YOU
https://htree.plus/

More Related Content

What's hot

Session tracking in servlets
Session tracking in servletsSession tracking in servlets
Session tracking in servletsvishal choudhary
 
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...Simplilearn
 
Socket programming in Java (PPTX)
Socket programming in Java (PPTX)Socket programming in Java (PPTX)
Socket programming in Java (PPTX)UC San Diego
 
Resource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in MainframesResource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in MainframesAayush Singh
 
Java Inheritance - sub class constructors - Method overriding
Java Inheritance - sub class constructors - Method overridingJava Inheritance - sub class constructors - Method overriding
Java Inheritance - sub class constructors - Method overridingNithyaN19
 
VMware Esx Short Presentation
VMware Esx Short PresentationVMware Esx Short Presentation
VMware Esx Short PresentationBarcamp Cork
 
Unit 4 designing classes
Unit 4  designing classesUnit 4  designing classes
Unit 4 designing classesgopal10scs185
 
Inheritance : Extending Classes
Inheritance : Extending ClassesInheritance : Extending Classes
Inheritance : Extending ClassesNilesh Dalvi
 
Access specifiers(modifiers) in java
Access specifiers(modifiers) in javaAccess specifiers(modifiers) in java
Access specifiers(modifiers) in javaHrithikShinde
 
Web and http computer network
Web and http computer networkWeb and http computer network
Web and http computer networkAnil Pokhrel
 

What's hot (20)

Php oop presentation
Php   oop presentationPhp   oop presentation
Php oop presentation
 
Adapter Pattern
Adapter PatternAdapter Pattern
Adapter Pattern
 
Session tracking in servlets
Session tracking in servletsSession tracking in servlets
Session tracking in servlets
 
polymorphism
polymorphism polymorphism
polymorphism
 
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
C++ Inheritance Tutorial | Introduction To Inheritance In C++ Programming Wit...
 
Access modifiers in java
Access modifiers in javaAccess modifiers in java
Access modifiers in java
 
Socket programming in Java (PPTX)
Socket programming in Java (PPTX)Socket programming in Java (PPTX)
Socket programming in Java (PPTX)
 
File handling
File handlingFile handling
File handling
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
 
Resource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in MainframesResource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in Mainframes
 
Java Inheritance - sub class constructors - Method overriding
Java Inheritance - sub class constructors - Method overridingJava Inheritance - sub class constructors - Method overriding
Java Inheritance - sub class constructors - Method overriding
 
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS ArchitectureDistributed DBMS - Unit 3 - Distributed DBMS Architecture
Distributed DBMS - Unit 3 - Distributed DBMS Architecture
 
Client server model
Client server modelClient server model
Client server model
 
Inheritance
InheritanceInheritance
Inheritance
 
VMware Esx Short Presentation
VMware Esx Short PresentationVMware Esx Short Presentation
VMware Esx Short Presentation
 
Unit 4 designing classes
Unit 4  designing classesUnit 4  designing classes
Unit 4 designing classes
 
Inheritance : Extending Classes
Inheritance : Extending ClassesInheritance : Extending Classes
Inheritance : Extending Classes
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
 
Access specifiers(modifiers) in java
Access specifiers(modifiers) in javaAccess specifiers(modifiers) in java
Access specifiers(modifiers) in java
 
Web and http computer network
Web and http computer networkWeb and http computer network
Web and http computer network
 

Similar to Opps Concept

Nhibernate Part 2
Nhibernate   Part 2Nhibernate   Part 2
Nhibernate Part 2guest075fec
 
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering CollegeObject Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering CollegeDhivyaa C.R
 
Wordpress (class,property,visibility,const,destr,inheritence,mysql etc)
Wordpress (class,property,visibility,const,destr,inheritence,mysql etc)Wordpress (class,property,visibility,const,destr,inheritence,mysql etc)
Wordpress (class,property,visibility,const,destr,inheritence,mysql etc)Rathod Shukar
 
Take the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphpTake the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphpAlena Holligan
 
Lecture-10_PHP-OOP.pptx
Lecture-10_PHP-OOP.pptxLecture-10_PHP-OOP.pptx
Lecture-10_PHP-OOP.pptxShaownRoy1
 
Demystifying Object-Oriented Programming #ssphp16
Demystifying Object-Oriented Programming #ssphp16Demystifying Object-Oriented Programming #ssphp16
Demystifying Object-Oriented Programming #ssphp16Alena Holligan
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented ProgrammingIqra khalil
 
Lecture 24 multiple-fileprograming.pptx
Lecture 24 multiple-fileprograming.pptxLecture 24 multiple-fileprograming.pptx
Lecture 24 multiple-fileprograming.pptxAyeCS11
 
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeBoost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeMarco Gralike
 
OOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingOOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingPurvik Rana
 
Querying XML: XPath and XQuery
Querying XML: XPath and XQueryQuerying XML: XPath and XQuery
Querying XML: XPath and XQueryKatrien Verbert
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowKarsten Dambekalns
 
Introducing PHP Latest Updates
Introducing PHP Latest UpdatesIntroducing PHP Latest Updates
Introducing PHP Latest UpdatesIftekhar Eather
 

Similar to Opps Concept (20)

Jscript part2
Jscript part2Jscript part2
Jscript part2
 
Nhibernate Part 2
Nhibernate   Part 2Nhibernate   Part 2
Nhibernate Part 2
 
UNIT III (8).pptx
UNIT III (8).pptxUNIT III (8).pptx
UNIT III (8).pptx
 
UNIT III (8).pptx
UNIT III (8).pptxUNIT III (8).pptx
UNIT III (8).pptx
 
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering CollegeObject Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
 
Wordpress (class,property,visibility,const,destr,inheritence,mysql etc)
Wordpress (class,property,visibility,const,destr,inheritence,mysql etc)Wordpress (class,property,visibility,const,destr,inheritence,mysql etc)
Wordpress (class,property,visibility,const,destr,inheritence,mysql etc)
 
Take the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphpTake the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphp
 
Lecture-10_PHP-OOP.pptx
Lecture-10_PHP-OOP.pptxLecture-10_PHP-OOP.pptx
Lecture-10_PHP-OOP.pptx
 
OOP in PHP
OOP in PHPOOP in PHP
OOP in PHP
 
Demystifying Object-Oriented Programming #ssphp16
Demystifying Object-Oriented Programming #ssphp16Demystifying Object-Oriented Programming #ssphp16
Demystifying Object-Oriented Programming #ssphp16
 
java part 1 computer science.pptx
java part 1 computer science.pptxjava part 1 computer science.pptx
java part 1 computer science.pptx
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Lecture 24 multiple-fileprograming.pptx
Lecture 24 multiple-fileprograming.pptxLecture 24 multiple-fileprograming.pptx
Lecture 24 multiple-fileprograming.pptx
 
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeBoost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
 
OOPs Concepts - Android Programming
OOPs Concepts - Android ProgrammingOOPs Concepts - Android Programming
OOPs Concepts - Android Programming
 
Encapsulation C++
Encapsulation C++Encapsulation C++
Encapsulation C++
 
Querying XML: XPath and XQuery
Querying XML: XPath and XQueryQuerying XML: XPath and XQuery
Querying XML: XPath and XQuery
 
Using Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 FlowUsing Document Databases with TYPO3 Flow
Using Document Databases with TYPO3 Flow
 
Inheritance
Inheritance Inheritance
Inheritance
 
Introducing PHP Latest Updates
Introducing PHP Latest UpdatesIntroducing PHP Latest Updates
Introducing PHP Latest Updates
 

Recently uploaded

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 

Recently uploaded (20)

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 

Opps Concept

  • 1. OOP (Object Oriented Programming) https://htree.plus/ Presented By, Nisarg Raval Kadam Parikh Kishan Sakariya Ria Jain
  • 2. What is OOP & 4-pillar? ❏ Object-oriented programming (OOP) is a programming language model in which programs are organized around data, or objects, rather than functions and logic. https://htree.plus/ Encapsulation Inheritance Polymorphism AbstractionOOP (4-pillar)
  • 3. https://htree.plus/ Inheritance ❏ Concepts at higher levels are more general. ❏ Concepts at lower levels are more specific (inherit properties of concepts at higher levels) Vehicle Wheeled Vehicle Boat Car Bicycle
  • 4. Inheritance (By Programming) https://htree.plus/ ❏ The language mechanism by which one class acquires the properties (data and operations) of another class ❏ Base Class (or superclass): the class being inherited from ❏ Derived Class (or subclass): the class that inherits
  • 5. https://htree.plus/ ❏ You can reuse the methods and data of the existing class ❏ You can extend the existing class by adding new data and new methods ❏ You can modify the existing class by overloading its methods with your own implementations Advantages Of Inheritance
  • 6. https://htree.plus/ Abstraction ❏ Objects in an OOP language provide an abstraction that hides the internal implementation details. ❏ Abstraction refers to the concept of hiding the complexities of a system from the users of that system
  • 7. Abstraction (Real World Example) ● For example, the coffee machine in your kitchen, you just need to know which methods of the object are available to call and which input parameters are needed to trigger a specific operation. But you don’t need to understand how this method is implemented and which kinds of actions it has to perform to create the expected result.
  • 8. Abstraction (By Programming) using namespace std; class implementAbstraction { private: int a, b; public: // method to set values of // private members void set(int x, int y) { a = x; b = y; } void display() { cout<<"a = " <<a << endl; cout<<"b = " << b << endl; } }; int main() { implementAbstraction obj; obj.set(10, 20); obj.display(); return 0; }
  • 9. https://htree.plus/ Encapsulation ❏ Encapsulation is a process of combining data members and functions in a single unit called class.
  • 10. https://htree.plus/ Encapsulation (Example) ❏ using System; ❏ namespace OPPs { ❏ class Encapsulation { ❏ private string Name = "Alex"; ❏ public string EmployeeName { // Property ❏ get { ❏ return Name; ❏ } ❏ set { ❏ Name = value; ❏ } ❏ } ❏ static void Main(string[] args) { ❏ string Name2 = string.Empty; ❏ // use properties ❏ Encapsulation e = new Encapsulation(); ❏ Name2 = e.EmployeeName; ❏ Console.WriteLine("Employee Name: " + Name2); ❏ Console.ReadLine(); ❏ } ❏ } ❏ }
  • 11. https://htree.plus/ Advantages Of Encapsulation & Abstraction ❏ Encapsulation helps us in binding the data(instance variables) and the member functions(that work on the instance variables) of a class. ❏ Abstraction helps the user to avoid writing the low level code ❏ Abstraction avoids code duplication and increases reusability. ❏ Abstraction can change internal implementation of class independently without affecting the user.
  • 12. https://htree.plus/ Polymorphism (By Real World Example) ● The word ‘polymorphism’ literally means ‘a state of having many shapes’ or ‘the capacity to take on different forms’.
  • 13. https://htree.plus/ Polymorphism (By Programming) ❏ Two types of polymorphism : - Dynamic Polymorphism - Static Polymorphism ❏ The process of binding the overloaded method within object at compile time is known as Static polymorphism ❏ In dynamic polymorphism method of the program binds with an object at runtime
  • 15. https://htree.plus/ Advantages Of Polymorphism ❏ It helps programmers reuse the code and classes once written, tested and implemented. They can be reused in many ways. ❏ Single variable name can be used to store variables of multiple data types(Float, double, Long, Int etc). ❏ Polymorphism helps in reducing the coupling between different functionalities.
  • 16. References ❏ https://medium.com/omarelgabrys-blog/the-story-of-object-oriented-programming- 12d1901a1825 ❏ https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html ❏ http://cs.smu.ca/~porter/csc/465/notes/oop.html ❏ https://atomicobject.com/resources/oo-programming/oo-quality ❏ https://medium.com/from-the-scratch/oop-everything-you-need-to-know-about-object- oriented-programming-aee3c18e281b ❏ https://www.javatpoint.com/java-oops-concepts ❏ https://tomassetti.me/oops-concepts/ ❏ http://www.differencebetween.net/technology/difference-between-oop-and-pop/ ❏ https://en.wikipedia.org/wiki/Object-oriented_programming ❏ https://en.wikipedia.org/wiki/Access_modifiers https://htree.plus/