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


Please Help Members By Posting Answers For Below Questions

Is it possible to pass an object of the same class in place of object reference to the copy constructor?

572


What are the types of pointer?

554


Why is c++ still popular?

589


What are the advantages of c++ over c?

586


What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?

609






What is the best c++ compiler?

596


Describe the syntax of single inheritance in C++?

651


Describe the setting up of my member functions to avoid overriding by the derived class?

614


Can notepad ++ run c++?

548


Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300

1795


What is microsoft c++ redistributable 2013?

579


How can an improvement in the quality of software be done by try/catch/throw?

594


What is ifstream c++?

565


How is c++ different from java?

565


What is the use of seekg in c++?

599