what is data Abstraction? and give example
Answer Posted / maddy
Data Encapsulation is the process of combining data and
functions into a single unit called class. By this method
one cannot access the data directly. Data is accessible
only through the functions present inside the class. Thus
Data Encapsulation gave rise to the important concept of
data hiding.
Example:
public class class1
{
void role1();
void role3();
}
class1 c=new class1();
c.role1();
c.role3();
---
dotnetpages.blogspot.com
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How is static data member similar to a global variable?
What is a binary file? List the merits and demerits of the binary file usagein C++.
what do you mean by volatile variable?
Is java the same as c++?
Why do we use the using declaration?
Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.
What is malloc in c++?
When should overload new operator on a global basis or a class basis?
What is a storage class? Mention the storage classes in c++.
Is there any function that can skip certain number of characters present in the input stream?
Can you please explain the difference between static and dynamic binding of functions?
What is c++ similar to?
Incase of a function declaration, what is extern means?
Who was the creator of c++?
Where the memory to the static variables is allocated?