0% found this document useful (0 votes)
10 views15 pages

1.what Is Data Abstraction? 2.how To Achieve Data Abstraction?

Uploaded by

Atikul Islam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views15 pages

1.what Is Data Abstraction? 2.how To Achieve Data Abstraction?

Uploaded by

Atikul Islam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

1

Course No: CSE 1254


1.What is Data
Course Name: Object Oriented Programming

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?

► Data abstraction is a programming technique that depends on separation of the


interface and implementation details of the program.

► 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.

Like here a user doesn’t need to know all the things,


machanism inside the car.

Reduced complexity
How to achieve Data Abstraction: 4

1.Abstraction using class.

2. Abstraction using header files.


Syntax of Data abstraction: 5
Example :
6
Class is
created here.

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

Data Hiding Code Access


& Security: Organizatio Control &
Reusability
n Security:
& Concise
Diffecence in code 13

Encapsulate Class
(private Data+ public Method)

Abstract Class

Output:

Hide Private data

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.

► gaining the information.


Proccess ► contain the information.
► Access modifiers
Implement ► Abstract class

► the objects that result in encapsulation need not be


abstracted. ► the objects that result in encapsulation need not be
Recompose abstracted.

► Secure data ► Hide Unwanted information


Concern
15

Q &A
#include <iostream>
using namespace std;
int main() {
cout<< "Happy Coding“ <<endl;
return 0;
}

You might also like