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
What is one dimensional array in c++?
What is c++ redistributable?
What is the difference between cin.read() and cin.getline()?
What is null pointer and void pointer and what is their use?
Describe linkages and types of linkages?
What is an object in c++?
Explain stack unwinding.
What are the rules for naming an identifier?
What do you mean by friend class & friend function in c++?
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that
What is the difference between a declaration and a definition?
Differentiate between a pointer and a reference with respect to c++.
In a function declaration, what does extern mean?
What you know about structures in C++?
What is a string example?