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
Are strings immutable in c++?
What is type of 'this' pointer?
What is a constant? Explain with an example.
What does I ++ mean in c++?
What are put and get pointers?
What is the output of the following program? Why?
What are abstract data types in c++?
What is virtual table?
What are the two types of comments, and how do they differ?
In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?
Describe the role of the c++ in the tradeoff of safety vs. Usability?
How can you differentiate between inheritance and implementation in c++?
Can we specify variable field width in a scanf() format string? If possible how?
How do you clear a map in c++?
What are pointer-to-members? Explain.