5
Most read
6
Most read
9
Most read
DATA ABSTARCTION
What is Data Abstraction?
The process by which data and functions are defined in such a way that
only essential details can be seen and unnecessary implementations
are hidden is called Data Abstraction.
The main focus of data abstraction is to separate the interface and the
implementation of the program.
Data Abstraction in Python
Abstraction is really powerful for making complex tasks and codes
simpler when used in Object-Oriented Programming. It reduces the
complexity for the user by making the relevant part accessible and
usable leaving the unnecessary code hidden. Also, there are times
when we do not want to give out sensitive parts of our code
implementation and this is where data abstraction can also prove to be
very functional.
Data Abstraction in Python can be achieved through creating abstract
classes and inheriting them later
Abstract Class
The classes that cannot be instantiated. This means that we cannot
create objects of an abstract class, and these are only meant to be
inherited. Then an object of the derived class is used to access the
features of the base class. These are specifically defined to lay a
foundation of other classes that exhibit common behavior or
characteristics.
Abstract Class Example
Why Use Abstract Base Class
Defining an Abstract Base Class lets us create a common Application
Programming Interface (API) for multiple subclasses. It is useful while
working in large teams and code-bases so that all of the classes need
not be remembered and also be provided as library by third parties.
from abc import ABC
class MyABC(ABC):
pass
Concrete Methods in Abstract Class
there are methods that have the same implementation for all
subclasses as well. There are characteristics that exhibit the properties
of the abstract class and so, must be implemented in the abstract class
itself. Otherwise, it will lead to repetitive code in all the inherited
classes. These methods are called concrete methods.
An abstract class can have both abstract methods and concrete
methods.
1. We always need to provide an implementation of the abstract
method in the child class even when implementation is given in the
abstract class.
2. A subclass must implement all abstract methods that are defined in
the parent class otherwise it results in an error.
Example of Data Abstraction
Python-DataAbstarction.pptx
Why Data Abstraction is important?
Data Abstraction firstly saves a lot of our time as we do not have to
repeat the code that may be the same for all the classes. Moreover, if
there are any additional features, they can be easily added, thus
improving flexibility. Not to mention, working in large teams becomes
easier as one won’t have to remember every function and the basic
structure can be inherited without any confusions.

More Related Content

PPTX
Polymorphism in Python
PPTX
Object Oriented Programming in Python
PPTX
Basics of Object Oriented Programming in Python
PPTX
OOP concepts -in-Python programming language
PDF
Object oriented approach in python programming
PPTX
Introduction to pandas
PPTX
Machine learning ppt
PPTX
Python: Polymorphism
Polymorphism in Python
Object Oriented Programming in Python
Basics of Object Oriented Programming in Python
OOP concepts -in-Python programming language
Object oriented approach in python programming
Introduction to pandas
Machine learning ppt
Python: Polymorphism

What's hot (20)

PDF
Python programming : Files
PPTX
Python OOPs
PPTX
Python Data Structures and Algorithms.pptx
PPTX
Constructor in java
PPSX
Modules and packages in python
PPTX
Looping Statements and Control Statements in Python
PPTX
Object oriented programming in python
PDF
Python programming : Abstract classes interfaces
PDF
Python Flow Control
PPTX
CLASS OBJECT AND INHERITANCE IN PYTHON
PPTX
Functions in Python
PDF
Python file handling
PDF
Python strings
PPTX
Python-Inheritance.pptx
PPTX
Class, object and inheritance in python
PDF
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
ODP
Python Modules
PDF
Php array
Python programming : Files
Python OOPs
Python Data Structures and Algorithms.pptx
Constructor in java
Modules and packages in python
Looping Statements and Control Statements in Python
Object oriented programming in python
Python programming : Abstract classes interfaces
Python Flow Control
CLASS OBJECT AND INHERITANCE IN PYTHON
Functions in Python
Python file handling
Python strings
Python-Inheritance.pptx
Class, object and inheritance in python
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Modules
Php array
Ad

Similar to Python-DataAbstarction.pptx (20)

PPTX
Data Abstraction.pptx
PDF
PPTX
python slid share.pptx
PPTX
Chapter 04 object oriented programming
PDF
4 pillars of OOPS CONCEPT
PPTX
Interoduction to c++
PPT
Csci360 20 (1)
PPT
Csci360 20
PDF
Object Oriented Programming With C 2140705 Darshan All Unit Darshan Institute...
PPTX
Abstraction in Python - Presentation.pptx
PDF
Understanding And Using Reflection
PDF
C# interview-questions
PDF
C#.net interview questions for dynamics 365 ce crm developers
PPTX
Design patterns
PPTX
Chapter1 introduction
PPTX
Design patterns
PDF
CS305PC_C++_UNIT 1 notes jntuh third semester
PPTX
PDF
Example Of Import Java
PPT
The smartpath information systems c plus plus
Data Abstraction.pptx
python slid share.pptx
Chapter 04 object oriented programming
4 pillars of OOPS CONCEPT
Interoduction to c++
Csci360 20 (1)
Csci360 20
Object Oriented Programming With C 2140705 Darshan All Unit Darshan Institute...
Abstraction in Python - Presentation.pptx
Understanding And Using Reflection
C# interview-questions
C#.net interview questions for dynamics 365 ce crm developers
Design patterns
Chapter1 introduction
Design patterns
CS305PC_C++_UNIT 1 notes jntuh third semester
Example Of Import Java
The smartpath information systems c plus plus
Ad

More from Karudaiyar Ganapathy (7)

PPTX
Python-FileHandling.pptx
PPTX
Python-exceptionHandling.pptx
PPTX
Python-Encapsulation.pptx
PPTX
Overloading vs Overriding.pptx
PPTX
Python-Polymorphism.pptx
PPTX
Python-Classes.pptx
PPTX
Python-Functions.pptx
Python-FileHandling.pptx
Python-exceptionHandling.pptx
Python-Encapsulation.pptx
Overloading vs Overriding.pptx
Python-Polymorphism.pptx
Python-Classes.pptx
Python-Functions.pptx

Recently uploaded (20)

PDF
Project_Mgmt_Institute_-Marc Marc Marc .pdf
PDF
MLpara ingenieira CIVIL, meca Y AMBIENTAL
PDF
[jvmmeetup] next-gen integration with apache camel and quarkus.pdf
PPTX
Solar energy pdf of gitam songa hemant k
PDF
Beginners-Guide-to-Artificial-Intelligence.pdf
PPTX
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
PDF
August -2025_Top10 Read_Articles_ijait.pdf
PDF
LOW POWER CLASS AB SI POWER AMPLIFIER FOR WIRELESS MEDICAL SENSOR NETWORK
PPTX
Unit_1_introduction to surveying for diploma.pptx
PDF
Mechanics of materials week 2 rajeshwari
PDF
UEFA_Carbon_Footprint_Calculator_Methology_2.0.pdf
PPT
Chapter 1 - Introduction to Manufacturing Technology_2.ppt
PPT
UNIT-I Machine Learning Essentials for 2nd years
PPTX
mechattonicsand iotwith sensor and actuator
PDF
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
PDF
Cryptography and Network Security-Module-I.pdf
PDF
electrical machines course file-anna university
PDF
Computer System Architecture 3rd Edition-M Morris Mano.pdf
PDF
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
PPTX
CN_Unite_1 AI&DS ENGGERING SPPU PUNE UNIVERSITY
Project_Mgmt_Institute_-Marc Marc Marc .pdf
MLpara ingenieira CIVIL, meca Y AMBIENTAL
[jvmmeetup] next-gen integration with apache camel and quarkus.pdf
Solar energy pdf of gitam songa hemant k
Beginners-Guide-to-Artificial-Intelligence.pdf
A Brief Introduction to IoT- Smart Objects: The "Things" in IoT
August -2025_Top10 Read_Articles_ijait.pdf
LOW POWER CLASS AB SI POWER AMPLIFIER FOR WIRELESS MEDICAL SENSOR NETWORK
Unit_1_introduction to surveying for diploma.pptx
Mechanics of materials week 2 rajeshwari
UEFA_Carbon_Footprint_Calculator_Methology_2.0.pdf
Chapter 1 - Introduction to Manufacturing Technology_2.ppt
UNIT-I Machine Learning Essentials for 2nd years
mechattonicsand iotwith sensor and actuator
UEFA_Embodied_Carbon_Emissions_Football_Infrastructure.pdf
Cryptography and Network Security-Module-I.pdf
electrical machines course file-anna university
Computer System Architecture 3rd Edition-M Morris Mano.pdf
Unit I -OPERATING SYSTEMS_SRM_KATTANKULATHUR.pptx.pdf
CN_Unite_1 AI&DS ENGGERING SPPU PUNE UNIVERSITY

Python-DataAbstarction.pptx

  • 2. What is Data Abstraction? The process by which data and functions are defined in such a way that only essential details can be seen and unnecessary implementations are hidden is called Data Abstraction. The main focus of data abstraction is to separate the interface and the implementation of the program.
  • 3. Data Abstraction in Python Abstraction is really powerful for making complex tasks and codes simpler when used in Object-Oriented Programming. It reduces the complexity for the user by making the relevant part accessible and usable leaving the unnecessary code hidden. Also, there are times when we do not want to give out sensitive parts of our code implementation and this is where data abstraction can also prove to be very functional. Data Abstraction in Python can be achieved through creating abstract classes and inheriting them later
  • 4. Abstract Class The classes that cannot be instantiated. This means that we cannot create objects of an abstract class, and these are only meant to be inherited. Then an object of the derived class is used to access the features of the base class. These are specifically defined to lay a foundation of other classes that exhibit common behavior or characteristics.
  • 6. Why Use Abstract Base Class Defining an Abstract Base Class lets us create a common Application Programming Interface (API) for multiple subclasses. It is useful while working in large teams and code-bases so that all of the classes need not be remembered and also be provided as library by third parties. from abc import ABC class MyABC(ABC): pass
  • 7. Concrete Methods in Abstract Class there are methods that have the same implementation for all subclasses as well. There are characteristics that exhibit the properties of the abstract class and so, must be implemented in the abstract class itself. Otherwise, it will lead to repetitive code in all the inherited classes. These methods are called concrete methods. An abstract class can have both abstract methods and concrete methods. 1. We always need to provide an implementation of the abstract method in the child class even when implementation is given in the abstract class. 2. A subclass must implement all abstract methods that are defined in the parent class otherwise it results in an error.
  • 8. Example of Data Abstraction
  • 10. Why Data Abstraction is important? Data Abstraction firstly saves a lot of our time as we do not have to repeat the code that may be the same for all the classes. Moreover, if there are any additional features, they can be easily added, thus improving flexibility. Not to mention, working in large teams becomes easier as one won’t have to remember every function and the basic structure can be inherited without any confusions.