SlideShare a Scribd company logo
1 of 10
Nadar saraswathi college of atrs and science,Theni.
DATA HIDDING AND DATA ABSTRACTION
SUBIMITTED BY
A.NAGA VARTHINI
I MSC CS
Data hiding:
Data hiding is also known as data encapsulation and it is the
process of hiding the implementation of specific parts of the
application from the user.
Data hiding plays a major role in making an application
secure and more robust.
Data hiding in python can be achieved by declaring class
members as private by putting a double underscore (__) as prefix
before the member name.
Syntax
The syntax for hiding data in python is as follows:
__variablename
Advantage of data hiding:
 Enhances security by encapsulation important data
 Hides irrelevant information from end user by
disconnecting object within the class from the useless
data.
 Prevent creation of links to wrong data.
DATA ABSTRACTION:
An abstract class can be considered as a blueprint for
other classes. It allows you to create a set of methods that must
be created within any child classes built form the abstract class.
A class which contains one or more abstract methods is
called an abstract class.
Why use Abstract Base classes:
By defining an abstract base class, you can define a
common Application Program Interface(API) for a set of
subclasses.
How Abstract Base classes work:
By default, Python does not provide abstract classes.
Python comes with a module that provide the base for
defining Abstract Base Classes(ABC) and that module name is
ABC.
Concrete methods in Abstract Base classes:
Concrete classes contain only concrete (normal) methods
where as abstract classes may contain both concrete methods
and abstract methods.
Concrete classes provides an implementation of abstract
methods, the abstract base class can also provide an
implementation by invoking the methods via super().
Abstract Properties:
Abstract classes include attributes in addition to
methods, you can require the attributes in concrete classes by
defining them with @abstractproperty.
python slid share.pptx

More Related Content

Similar to python slid share.pptx

Jedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented conceptsJedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented concepts
Maryo Manjaruni
 
Object-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdfObject-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdf
Bharath Choudhary
 

Similar to python slid share.pptx (20)

Php oop (1)
Php oop (1)Php oop (1)
Php oop (1)
 
Jedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented conceptsJedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented concepts
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
C++ Notes
C++ NotesC++ Notes
C++ Notes
 
OOP interview questions & answers.
OOP interview questions & answers.OOP interview questions & answers.
OOP interview questions & answers.
 
Object-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdfObject-Oriented Programming in Java.pdf
Object-Oriented Programming in Java.pdf
 
Oops concepts
Oops conceptsOops concepts
Oops concepts
 
Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad
Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad
Cocoa and MVC in ios, iOS Training Ahmedbad , iOS classes Ahmedabad
 
Encapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistenceEncapsulation of operations, methods & persistence
Encapsulation of operations, methods & persistence
 
Basics of Object Oriented Programming in Python
Basics of Object Oriented Programming in PythonBasics of Object Oriented Programming in Python
Basics of Object Oriented Programming in Python
 
Oops
OopsOops
Oops
 
OOP in Python, a beginners guide..........
OOP in Python, a beginners guide..........OOP in Python, a beginners guide..........
OOP in Python, a beginners guide..........
 
Python-Encapsulation.pptx
Python-Encapsulation.pptxPython-Encapsulation.pptx
Python-Encapsulation.pptx
 
Class objects oopm
Class objects oopmClass objects oopm
Class objects oopm
 
Java sessionnotes
Java sessionnotesJava sessionnotes
Java sessionnotes
 
python.pptx
python.pptxpython.pptx
python.pptx
 
concept of oops
concept of oopsconcept of oops
concept of oops
 
Oops
OopsOops
Oops
 
Class properties
Class propertiesClass properties
Class properties
 
LectureNotes-02-DSA
LectureNotes-02-DSALectureNotes-02-DSA
LectureNotes-02-DSA
 

More from NagaVarthini

More from NagaVarthini (7)

Dealing with imbalanced data sets.pdf
Dealing with imbalanced data sets.pdfDealing with imbalanced data sets.pdf
Dealing with imbalanced data sets.pdf
 
Edge detection.pdf
Edge detection.pdfEdge detection.pdf
Edge detection.pdf
 
Django Designing.pdf
Django Designing.pdfDjango Designing.pdf
Django Designing.pdf
 
Cloud Software Enviornment
Cloud Software EnviornmentCloud Software Enviornment
Cloud Software Enviornment
 
Guidelines for indexing and tools
Guidelines for indexing and toolsGuidelines for indexing and tools
Guidelines for indexing and tools
 
Email established keys privacy
Email established keys privacyEmail established keys privacy
Email established keys privacy
 
dos slide share.pptx
dos slide share.pptxdos slide share.pptx
dos slide share.pptx
 

Recently uploaded

Recently uploaded (20)

Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 

python slid share.pptx

  • 1. Nadar saraswathi college of atrs and science,Theni. DATA HIDDING AND DATA ABSTRACTION SUBIMITTED BY A.NAGA VARTHINI I MSC CS
  • 2. Data hiding: Data hiding is also known as data encapsulation and it is the process of hiding the implementation of specific parts of the application from the user. Data hiding plays a major role in making an application secure and more robust. Data hiding in python can be achieved by declaring class members as private by putting a double underscore (__) as prefix before the member name.
  • 3. Syntax The syntax for hiding data in python is as follows: __variablename
  • 4. Advantage of data hiding:  Enhances security by encapsulation important data  Hides irrelevant information from end user by disconnecting object within the class from the useless data.  Prevent creation of links to wrong data.
  • 5. DATA ABSTRACTION: An abstract class can be considered as a blueprint for other classes. It allows you to create a set of methods that must be created within any child classes built form the abstract class. A class which contains one or more abstract methods is called an abstract class.
  • 6. Why use Abstract Base classes: By defining an abstract base class, you can define a common Application Program Interface(API) for a set of subclasses.
  • 7. How Abstract Base classes work: By default, Python does not provide abstract classes. Python comes with a module that provide the base for defining Abstract Base Classes(ABC) and that module name is ABC.
  • 8. Concrete methods in Abstract Base classes: Concrete classes contain only concrete (normal) methods where as abstract classes may contain both concrete methods and abstract methods. Concrete classes provides an implementation of abstract methods, the abstract base class can also provide an implementation by invoking the methods via super().
  • 9. Abstract Properties: Abstract classes include attributes in addition to methods, you can require the attributes in concrete classes by defining them with @abstractproperty.