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
Why do we use vector in c++?
What does catch(…) mean?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
What is time_t c++?
What is buffer and example?
In inline " expression passed as argument are evalauated once " while in macro "in some cases expression passed as argument are evaluated more than once " --> i am not getting it plz help to make me understand....
Difference between an inspector and a mutator
What is the need of a destructor? Explain with the help of an example.
What do you mean by global variables?
What are c++ files?
What is meant by entry controlled loop? What all C++ loops are exit controlled?
What do manipulators do?
Explain deep copy and a shallow copy?
What is type of 'this' pointer?
Where the memory to the static variables is allocated?