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.

More Related Content

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

PPTX
Introduction to Object Oriented Programming.pptx
ssuser8d54ed
 
DOCX
Benefits of encapsulation
Muhammad Nawzir Khan
 
PDF
What is Object-Oriented Programming (OOP) and Why Do We Need It?
MikeShadrin
 
PPT
Basic concept of OOP's
Prof. Dr. K. Adisesha
 
PPTX
130704798265658191
Tanzeel Ahmad
 
DOCX
Object Oriented Programming All Unit Notes
BalamuruganV28
 
PPTX
1 intro
abha48
 
PPTX
object oriented programming(oops)
HANISHTHARWANI21BCE1
 
PPTX
Chapter1 introduction
Jeevan Acharya
 
DOCX
Unit1 jaava
mrecedu
 
PDF
II BCA JAVA PROGRAMMING NOTES FOR FIVE UNITS.pdf
rajeswaria21
 
PPTX
PHP OOP Lecture - 01.pptx
Atikur Rahman
 
PPTX
Object-Oriented Programming in Real world Applications
MehmoodHasnain
 
PPTX
JAVA - Oops Concept.pptx
ayankamila005
 
PDF
Oops concepts
ACCESS Health Digital
 
PPTX
yo.pptxoajsdisa odasjd asodjaojdoawjdoasjdow
l226207
 
PPTX
OOP.pptx
kalyanibedekar
 
PPTX
CPP-Unit 1.pptx
YashKoli22
 
PPTX
POP vs OOP Introduction
Hashni T
 
PDF
Oop basic overview
Deborah Akuoko
 
Introduction to Object Oriented Programming.pptx
ssuser8d54ed
 
Benefits of encapsulation
Muhammad Nawzir Khan
 
What is Object-Oriented Programming (OOP) and Why Do We Need It?
MikeShadrin
 
Basic concept of OOP's
Prof. Dr. K. Adisesha
 
130704798265658191
Tanzeel Ahmad
 
Object Oriented Programming All Unit Notes
BalamuruganV28
 
1 intro
abha48
 
object oriented programming(oops)
HANISHTHARWANI21BCE1
 
Chapter1 introduction
Jeevan Acharya
 
Unit1 jaava
mrecedu
 
II BCA JAVA PROGRAMMING NOTES FOR FIVE UNITS.pdf
rajeswaria21
 
PHP OOP Lecture - 01.pptx
Atikur Rahman
 
Object-Oriented Programming in Real world Applications
MehmoodHasnain
 
JAVA - Oops Concept.pptx
ayankamila005
 
Oops concepts
ACCESS Health Digital
 
yo.pptxoajsdisa odasjd asodjaojdoawjdoasjdow
l226207
 
OOP.pptx
kalyanibedekar
 
CPP-Unit 1.pptx
YashKoli22
 
POP vs OOP Introduction
Hashni T
 
Oop basic overview
Deborah Akuoko
 

Recently uploaded (20)

DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PPTX
Green Building & Energy Conservation ppt
Sagar Sarangi
 
PPTX
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
PDF
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
PDF
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
PPTX
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PPTX
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PPTX
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PPTX
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
Green Building & Energy Conservation ppt
Sagar Sarangi
 
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
Thermal runway and thermal stability.pptx
godow93766
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
Hashing Introduction , hash functions and techniques
sailajam21
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
MRRS Strength and Durability of Concrete
CivilMythili
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
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.