1.what Is Data Abstraction? 2.how To Achieve Data Abstraction?
1.what Is Data Abstraction? 2.how To Achieve Data Abstraction?
Abstraction?
2.How to achieve Data
Abstraction?
PRESENTED
BY:
Atikul Islam
ASIF AREFIN
3.Difference between KHAN Roll: 2104040
ROLL:2104054
Data Abstraction and
Encapsulation.
2
What is data abstraction?
► It can hide the unnecessary internal details and represent only the essential details
in the program.
Real life example about Abstraction: 3
Abstraction only lets to use the necessary data and hides all
the unnecessary datas.
Reduced complexity
How to achieve Data Abstraction: 4
Access
specifier
Object is created.
Output of the previous code: 7
Difference Between Data Abstraction and 8
Encapsulation
What is Encapsulation
WAIT
!
Encapsulation 9
► Encapsulation is the process of buinding Data with Methods into a single entity.
Methods + Variables
► Class
► Function inside the class Data inside the class
► These function which we are making inside the class must use only member variables .
10
Illustration :
Users Implement
Guess
Combine
Guess + Trick Restricts Details
for Security
Member variable
11
Default Value
Methods
Implement through
Object
Some Features of Encapsulation 12
Encapsulate Class
(private Data+ public Method)
Abstract Class
Output:
Hide Unneccsary
starting Details
Key Difference
14
Encapsulation Abstraction
Concept ► Wrapping up of data and information in class ► Hiding the unnecessary details
► Interface level
Solution ► Implementation level.
Q &A
#include <iostream>
using namespace std;
int main() {
cout<< "Happy Coding“ <<endl;
return 0;
}