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
How a new element can be added or pushed in a stack?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
Is c++ an integer?
What are the benefits of c++?
What is c++ hiding?
What is the return value of the insertion operator?
What is set in c++?
What is a storage class? Mention the storage classes in c++.
Is c++ a software?
What is main function in c++ with example?
When does a name clash occur in c++?
How long will it take to learn programming?
What are register variables?
What operator is used to access a struct through a pointer a) >> b) -> c) *
What are the rules for naming an identifier?