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
What are the types of pointer?
How can you quickly find the number of elements stored in a static array?
When do we run a shell in the unix system?
Is std :: string immutable?
What is meaning of in c++?
What is enum class in c++?
What is a local variable?
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
What is the difference between a pointer and a link in c ++?
How do you define a class in c++?
Does c++ support multilevel and multiple inheritances?
You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()
What is purpose of abstract class?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
What gives the current position of the put pointer?