what is data Abstraction? and give example
Answer Posted / rlv
Abstraction is categorized as Data Abstraction and Procedural Abstraction. In data abstraction, the way the data are stored e.g. the structure or arrangement of data is hidden.
Procedural abstraction on the other hand, hides the details on how the function/procedure/method works. You must only know the inputs and the expected outputs, much like a black-box. The two ideas combined serve as one of the important concept in OOP called Encapsulation.
As an example, when you create a class for StudentGrades, the variables and their structure for representing grades is hidden by using the private keyword, you only provide methods to access and manipulate this data.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why main function is special in c++?
What is the full form of stl in c++?
Is python written in c or c++?
When are exception objects created?
Why pointer is used in c++?
What are the uses of typedef in a program?
What does it mean to declare a destructor as static?
Which sort is best for the set: 1 2 3 5 4 a) Quick Sort b) Bubble Sort c) Merge Sort
How do you establish a has-a relationship?
Explain overriding.
What is the best way to take screenshots of a window with c++ in windows?
What are structures and unions?
What are iterators in c++?
Explain object slicing in c++?
What is this pointer in c++?