SlideShare a Scribd company logo
OBJECT ORIENTED PROGRAMMING Made By Noshaba
WHAT IS OOP’S?
OOP stands for "Object-Oriented Programming." It's a way of structuring your code in
programming languages like C++,C# , python and java
Objects are self-contained units that combine data (attributes or properties) and the
functions (methods) that can operate on that data into a single entity.
DIFFERENCE BETWEEN PROCEDURAL AND OOP..
Data Organization: Procedural programming uses global variables for data,
whereas OOP encapsulates data within objects.
Code Structure: Procedural code is structured around functions, while OOP code is
organized around objects and their methods.
Data Access: In procedural programming, data is often accessible globally, leading
to potential data conflicts. In OOP, data is encapsulated within objects, making it more
controlled and secure.
Reusability: OOP promotes code reusability through classes and inheritance, making
it easier to create and reuse similar objects.
In summary, the key difference lies in how data is organized and accessed:
procedural programming uses global data and functions, while OOP encapsulates
data and behavior within objects, providing better structure and control
WHY WE NEED FOR OOP?
We need Object-Oriented Programming (OOP) in simple terms because it helps us
build software more efficiently and make it easier to understand and manage.
Certainly, let's simplify the need for Object-Oriented Programming (OOP) even
further:
Think of OOP as a way to make computer programs more organized and
understandable, just like how we use folders to organize our files on a computer.
Objects as Folders: In OOP, we treat different parts of our program as "objects,"
which are like folders. Each object contains its own stuff, like data and actions, just like
folders can contain files.
Reuse and Efficiency: OOP allows us to reuse these objects in different parts of our program,
similar to how we can use the same folder in various places on our computer. This makes our code
more efficient and saves us from doing the same work over and over.
Clean and Clear: Just as folders help us keep our files organized and easy to find, OOP helps us
keep our code organized and easy to understand. We can see what each object does and how it
relates to other objects.
Flexibility: If we want to change or add something in one part of our program, we can do it
without affecting other parts. It's like rearranging or adding files in one folder without disturbing
the contents of other folders.
So, OOP is like using folders to keep our computer files organized. It helps us reuse code, keep
our code clean and understandable, make changes easily, and collaborate effectively when
building software.
TECHNIQUE IN OOP
Class:
A class is like a blueprint or a template.
It tells the computer how to create something.
For example, a "Car" class is like a blueprint for making cars. It defines what a car should have
(like wheels and a color) and what it can do (like drive and stop).
public class Car
{
public string name;
public string model;
public void Greet()
{
Console.WriteLine("Hello, my car name is " + name);
}
}
OBJECT:
An object is a real thing that was created using a class.
It's like the actual car made from the "Car" blueprint.
Each object can have its own unique characteristics and can do things based on what
the class defined.
In even simpler terms, a class is a plan, and an object is something made from that
plan. For example, a "Recipe" (class) tells you how to make a cake, and the actual
"Cake" (object) is what you bake using that recipe
Encapsulation: This is like putting a protective shield around an object's data (attributes)
and methods. It keeps them safe from unwanted changes or access. You can only interact
with an object through its defined methods, which maintain control and security.
Inheritance: Inheritance is like passing down traits from parents to children. In OOP, you can
create new classes based on existing ones. The new class inherits attributes and methods
from the original class, making it easier to reuse code and build on existing functionality.
Abstraction:
Abstraction in Object-Oriented Programming (OOP) is a fundamental concept that focuses
on hiding unnecessary details and showing only the essential features of an object. It's like
creating a simplified interface for users to interact with, without needing to understand the
complex inner workings.
In simple terms, OOP is like playing with different types of toys (objects) that have their
own unique features (attributes) and things they can do (methods). These toys are created
based on specific blueprints (classes). Encapsulation keeps them safe and organized,
inheritance lets you create new toys with shared features, and polymorphism allows you to
use all your toys in a playful and flexible way.
Ad

Recommended

Procedural-vs-Object-Oriented-Programming (1).pdf
Procedural-vs-Object-Oriented-Programming (1).pdf
AnujMalviya12
 
Object-oriented programming computer subject.pptx
Object-oriented programming computer subject.pptx
agnesuenera
 
yo.pptxoajsdisa odasjd asodjaojdoawjdoasjdow
yo.pptxoajsdisa odasjd asodjaojdoawjdoasjdow
l226207
 
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
OBJECT ORIENTED PROGRAMMING CONCEPTS IN C++.pptx
Maharshi Dayanand University Rohtak
 
object oriented programming and methodology.pptx
object oriented programming and methodology.pptx
ayush626953
 
Object Oriented Programming in C++ in software development
Object Oriented Programming in C++ in software development
khairpurkcaet
 
An overview of Object Oriented Programming in C#.
An overview of Object Oriented Programming in C#.
prajapatrishabh421
 
Intro to oop.pptx
Intro to oop.pptx
UmerUmer25
 
Characteristics-and-Advantages-of-Object-Oriented-Programming.pptx
Characteristics-and-Advantages-of-Object-Oriented-Programming.pptx
mahendrasubedi2060
 
CPP-Unit 1.pptx
CPP-Unit 1.pptx
YashKoli22
 
Object Oriented Program Class 12 Computer Science
Object Oriented Program Class 12 Computer Science
ShailendraPandey96
 
introduction of Object oriented programming
introduction of Object oriented programming
RiturajJain8
 
L1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdf
BhanuJatinSingh
 
Introduction to Object Oriented Programming.pdf
Introduction to Object Oriented Programming.pdf
ManishBej3
 
Computer_Programming_Part_II_Segment_01.pdf
Computer_Programming_Part_II_Segment_01.pdf
et243047
 
object oriented programming concepts and explanation
object oriented programming concepts and explanation
SATYA136395
 
Object-Oriented Programming in Real world Applications
Object-Oriented Programming in Real world Applications
MehmoodHasnain
 
object oriented programing lecture 1
object oriented programing lecture 1
Geophery sanga
 
Ch 1 Introduction to Object Oriented Programming.pptx
Ch 1 Introduction to Object Oriented Programming.pptx
MahiDivya
 
Oops concepts
Oops concepts
Kanan Gandhi
 
oop.pptx
oop.pptx
KabitaParajuli3
 
Object oriented programming
Object oriented programming
sana younas
 
Object Oriented Programming.pptx its a opps concept in c++ which is helpful
Object Oriented Programming.pptx its a opps concept in c++ which is helpful
vidhimangal05
 
Object Oriented Programming using c++ main four piller in this
Object Oriented Programming using c++ main four piller in this
vidhimangal05
 
Object oriented programming
Object oriented programming
baabtra.com - No. 1 supplier of quality freshers
 
What is OOP_ (Object Oriented Programming) (1).pptx
What is OOP_ (Object Oriented Programming) (1).pptx
hreempandya
 
Oops slide
Oops slide
Ashok Sharma
 
Chapter 04 object oriented programming
Chapter 04 object oriented programming
Praveen M Jigajinni
 
最新版美国圣莫尼卡学院毕业证(SMC毕业证书)原版定制
最新版美国圣莫尼卡学院毕业证(SMC毕业证书)原版定制
Taqyea
 
Industrial internet of things IOT Week-3.pptx
Industrial internet of things IOT Week-3.pptx
KNaveenKumarECE
 

More Related Content

Similar to Object oriented programming (oops) python (20)

Characteristics-and-Advantages-of-Object-Oriented-Programming.pptx
Characteristics-and-Advantages-of-Object-Oriented-Programming.pptx
mahendrasubedi2060
 
CPP-Unit 1.pptx
CPP-Unit 1.pptx
YashKoli22
 
Object Oriented Program Class 12 Computer Science
Object Oriented Program Class 12 Computer Science
ShailendraPandey96
 
introduction of Object oriented programming
introduction of Object oriented programming
RiturajJain8
 
L1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdf
BhanuJatinSingh
 
Introduction to Object Oriented Programming.pdf
Introduction to Object Oriented Programming.pdf
ManishBej3
 
Computer_Programming_Part_II_Segment_01.pdf
Computer_Programming_Part_II_Segment_01.pdf
et243047
 
object oriented programming concepts and explanation
object oriented programming concepts and explanation
SATYA136395
 
Object-Oriented Programming in Real world Applications
Object-Oriented Programming in Real world Applications
MehmoodHasnain
 
object oriented programing lecture 1
object oriented programing lecture 1
Geophery sanga
 
Ch 1 Introduction to Object Oriented Programming.pptx
Ch 1 Introduction to Object Oriented Programming.pptx
MahiDivya
 
Oops concepts
Oops concepts
Kanan Gandhi
 
oop.pptx
oop.pptx
KabitaParajuli3
 
Object oriented programming
Object oriented programming
sana younas
 
Object Oriented Programming.pptx its a opps concept in c++ which is helpful
Object Oriented Programming.pptx its a opps concept in c++ which is helpful
vidhimangal05
 
Object Oriented Programming using c++ main four piller in this
Object Oriented Programming using c++ main four piller in this
vidhimangal05
 
Object oriented programming
Object oriented programming
baabtra.com - No. 1 supplier of quality freshers
 
What is OOP_ (Object Oriented Programming) (1).pptx
What is OOP_ (Object Oriented Programming) (1).pptx
hreempandya
 
Oops slide
Oops slide
Ashok Sharma
 
Chapter 04 object oriented programming
Chapter 04 object oriented programming
Praveen M Jigajinni
 
Characteristics-and-Advantages-of-Object-Oriented-Programming.pptx
Characteristics-and-Advantages-of-Object-Oriented-Programming.pptx
mahendrasubedi2060
 
CPP-Unit 1.pptx
CPP-Unit 1.pptx
YashKoli22
 
Object Oriented Program Class 12 Computer Science
Object Oriented Program Class 12 Computer Science
ShailendraPandey96
 
introduction of Object oriented programming
introduction of Object oriented programming
RiturajJain8
 
L1-Introduction to OOPs concepts.pdf
L1-Introduction to OOPs concepts.pdf
BhanuJatinSingh
 
Introduction to Object Oriented Programming.pdf
Introduction to Object Oriented Programming.pdf
ManishBej3
 
Computer_Programming_Part_II_Segment_01.pdf
Computer_Programming_Part_II_Segment_01.pdf
et243047
 
object oriented programming concepts and explanation
object oriented programming concepts and explanation
SATYA136395
 
Object-Oriented Programming in Real world Applications
Object-Oriented Programming in Real world Applications
MehmoodHasnain
 
object oriented programing lecture 1
object oriented programing lecture 1
Geophery sanga
 
Ch 1 Introduction to Object Oriented Programming.pptx
Ch 1 Introduction to Object Oriented Programming.pptx
MahiDivya
 
Object oriented programming
Object oriented programming
sana younas
 
Object Oriented Programming.pptx its a opps concept in c++ which is helpful
Object Oriented Programming.pptx its a opps concept in c++ which is helpful
vidhimangal05
 
Object Oriented Programming using c++ main four piller in this
Object Oriented Programming using c++ main four piller in this
vidhimangal05
 
What is OOP_ (Object Oriented Programming) (1).pptx
What is OOP_ (Object Oriented Programming) (1).pptx
hreempandya
 
Chapter 04 object oriented programming
Chapter 04 object oriented programming
Praveen M Jigajinni
 

Recently uploaded (20)

最新版美国圣莫尼卡学院毕业证(SMC毕业证书)原版定制
最新版美国圣莫尼卡学院毕业证(SMC毕业证书)原版定制
Taqyea
 
Industrial internet of things IOT Week-3.pptx
Industrial internet of things IOT Week-3.pptx
KNaveenKumarECE
 
special_edition_using_visual_foxpro_6.pdf
special_edition_using_visual_foxpro_6.pdf
Shabista Imam
 
Stay Safe Women Security Android App Project Report.pdf
Stay Safe Women Security Android App Project Report.pdf
Kamal Acharya
 
NALCO Green Anode Plant,Compositions of CPC,Pitch
NALCO Green Anode Plant,Compositions of CPC,Pitch
arpitprachi123
 
Microwatt: Open Tiny Core, Big Possibilities
Microwatt: Open Tiny Core, Big Possibilities
IBM
 
David Boutry - Mentors Junior Developers
David Boutry - Mentors Junior Developers
David Boutry
 
IntroSlides-June-GDG-Cloud-Munich community [email protected]
IntroSlides-June-GDG-Cloud-Munich community [email protected]
Luiz Carneiro
 
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
ijab2
 
DESIGN OF REINFORCED CONCRETE ELEMENTS S
DESIGN OF REINFORCED CONCRETE ELEMENTS S
prabhusp8
 
Low Power SI Class E Power Amplifier and Rf Switch for Health Care
Low Power SI Class E Power Amplifier and Rf Switch for Health Care
ieijjournal
 
Machine Learning - Classification Algorithms
Machine Learning - Classification Algorithms
resming1
 
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
resming1
 
Structured Programming with C++ :: Kjell Backman
Structured Programming with C++ :: Kjell Backman
Shabista Imam
 
System design handwritten notes guidance
System design handwritten notes guidance
Shabista Imam
 
Modern multi-proposer consensus implementations
Modern multi-proposer consensus implementations
François Garillot
 
Proposal for folders structure division in projects.pdf
Proposal for folders structure division in projects.pdf
Mohamed Ahmed
 
Week 6- PC HARDWARE AND MAINTENANCE-THEORY.pptx
Week 6- PC HARDWARE AND MAINTENANCE-THEORY.pptx
dayananda54
 
Quiz on EV , made fun and progressive !!!
Quiz on EV , made fun and progressive !!!
JaishreeAsokanEEE
 
A Cluster-Based Trusted Secure Multipath Routing Protocol for Mobile Ad Hoc N...
A Cluster-Based Trusted Secure Multipath Routing Protocol for Mobile Ad Hoc N...
IJCNCJournal
 
最新版美国圣莫尼卡学院毕业证(SMC毕业证书)原版定制
最新版美国圣莫尼卡学院毕业证(SMC毕业证书)原版定制
Taqyea
 
Industrial internet of things IOT Week-3.pptx
Industrial internet of things IOT Week-3.pptx
KNaveenKumarECE
 
special_edition_using_visual_foxpro_6.pdf
special_edition_using_visual_foxpro_6.pdf
Shabista Imam
 
Stay Safe Women Security Android App Project Report.pdf
Stay Safe Women Security Android App Project Report.pdf
Kamal Acharya
 
NALCO Green Anode Plant,Compositions of CPC,Pitch
NALCO Green Anode Plant,Compositions of CPC,Pitch
arpitprachi123
 
Microwatt: Open Tiny Core, Big Possibilities
Microwatt: Open Tiny Core, Big Possibilities
IBM
 
David Boutry - Mentors Junior Developers
David Boutry - Mentors Junior Developers
David Boutry
 
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
VARICELLA VACCINATION: A POTENTIAL STRATEGY FOR PREVENTING MULTIPLE SCLEROSIS
ijab2
 
DESIGN OF REINFORCED CONCRETE ELEMENTS S
DESIGN OF REINFORCED CONCRETE ELEMENTS S
prabhusp8
 
Low Power SI Class E Power Amplifier and Rf Switch for Health Care
Low Power SI Class E Power Amplifier and Rf Switch for Health Care
ieijjournal
 
Machine Learning - Classification Algorithms
Machine Learning - Classification Algorithms
resming1
 
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
resming1
 
Structured Programming with C++ :: Kjell Backman
Structured Programming with C++ :: Kjell Backman
Shabista Imam
 
System design handwritten notes guidance
System design handwritten notes guidance
Shabista Imam
 
Modern multi-proposer consensus implementations
Modern multi-proposer consensus implementations
François Garillot
 
Proposal for folders structure division in projects.pdf
Proposal for folders structure division in projects.pdf
Mohamed Ahmed
 
Week 6- PC HARDWARE AND MAINTENANCE-THEORY.pptx
Week 6- PC HARDWARE AND MAINTENANCE-THEORY.pptx
dayananda54
 
Quiz on EV , made fun and progressive !!!
Quiz on EV , made fun and progressive !!!
JaishreeAsokanEEE
 
A Cluster-Based Trusted Secure Multipath Routing Protocol for Mobile Ad Hoc N...
A Cluster-Based Trusted Secure Multipath Routing Protocol for Mobile Ad Hoc N...
IJCNCJournal
 
Ad

Object oriented programming (oops) python

  • 1. OBJECT ORIENTED PROGRAMMING Made By Noshaba
  • 2. WHAT IS OOP’S? OOP stands for "Object-Oriented Programming." It's a way of structuring your code in programming languages like C++,C# , python and java Objects are self-contained units that combine data (attributes or properties) and the functions (methods) that can operate on that data into a single entity.
  • 3. DIFFERENCE BETWEEN PROCEDURAL AND OOP.. Data Organization: Procedural programming uses global variables for data, whereas OOP encapsulates data within objects. Code Structure: Procedural code is structured around functions, while OOP code is organized around objects and their methods. Data Access: In procedural programming, data is often accessible globally, leading to potential data conflicts. In OOP, data is encapsulated within objects, making it more controlled and secure. Reusability: OOP promotes code reusability through classes and inheritance, making it easier to create and reuse similar objects. In summary, the key difference lies in how data is organized and accessed: procedural programming uses global data and functions, while OOP encapsulates data and behavior within objects, providing better structure and control
  • 4. WHY WE NEED FOR OOP? We need Object-Oriented Programming (OOP) in simple terms because it helps us build software more efficiently and make it easier to understand and manage. Certainly, let's simplify the need for Object-Oriented Programming (OOP) even further: Think of OOP as a way to make computer programs more organized and understandable, just like how we use folders to organize our files on a computer. Objects as Folders: In OOP, we treat different parts of our program as "objects," which are like folders. Each object contains its own stuff, like data and actions, just like folders can contain files.
  • 5. Reuse and Efficiency: OOP allows us to reuse these objects in different parts of our program, similar to how we can use the same folder in various places on our computer. This makes our code more efficient and saves us from doing the same work over and over. Clean and Clear: Just as folders help us keep our files organized and easy to find, OOP helps us keep our code organized and easy to understand. We can see what each object does and how it relates to other objects. Flexibility: If we want to change or add something in one part of our program, we can do it without affecting other parts. It's like rearranging or adding files in one folder without disturbing the contents of other folders. So, OOP is like using folders to keep our computer files organized. It helps us reuse code, keep our code clean and understandable, make changes easily, and collaborate effectively when building software.
  • 6. TECHNIQUE IN OOP Class: A class is like a blueprint or a template. It tells the computer how to create something. For example, a "Car" class is like a blueprint for making cars. It defines what a car should have (like wheels and a color) and what it can do (like drive and stop). public class Car { public string name; public string model; public void Greet() { Console.WriteLine("Hello, my car name is " + name); } }
  • 7. OBJECT: An object is a real thing that was created using a class. It's like the actual car made from the "Car" blueprint. Each object can have its own unique characteristics and can do things based on what the class defined. In even simpler terms, a class is a plan, and an object is something made from that plan. For example, a "Recipe" (class) tells you how to make a cake, and the actual "Cake" (object) is what you bake using that recipe
  • 8. Encapsulation: This is like putting a protective shield around an object's data (attributes) and methods. It keeps them safe from unwanted changes or access. You can only interact with an object through its defined methods, which maintain control and security. Inheritance: Inheritance is like passing down traits from parents to children. In OOP, you can create new classes based on existing ones. The new class inherits attributes and methods from the original class, making it easier to reuse code and build on existing functionality. Abstraction: Abstraction in Object-Oriented Programming (OOP) is a fundamental concept that focuses on hiding unnecessary details and showing only the essential features of an object. It's like creating a simplified interface for users to interact with, without needing to understand the complex inner workings. In simple terms, OOP is like playing with different types of toys (objects) that have their own unique features (attributes) and things they can do (methods). These toys are created based on specific blueprints (classes). Encapsulation keeps them safe and organized, inheritance lets you create new toys with shared features, and polymorphism allows you to use all your toys in a playful and flexible way.