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 the use of object in c++?
explain the reference variable in c++?
What is pure virtual function? Or what is abstract class?
What is meant by the term name mangling in c++?
What are enumerations?
Define 'std'.
Explain container class.
What do you know about near, far and huge pointer?
Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.
What is #include c++?
What is the use of lambda in c++?
What is difference between array and vector in c++?
Why cout is used in c++?
What is the size of a vector?
Explain what are accessor methods?