Tag: encapsulation

what is encapsulation?

January 12, 2010 | Filed Under Oops | Leave a Comment

Encapsulation the ability of an object to hide its data and methods from the rest of the world. It is one of the fundamental principles of Oops.

The protection involves providing a stable interface which protects the remainder of the program from the implementation (the details that are most likely to change).

Public class Add
{
private void subtract(int x, int y)
{
return x * y;
}
}


Add obj;
int Result;
Result = obj.subtract(5,10);

Article written by urooj

What is encapsulation?

December 24, 2009 | Filed Under C plus plus | Leave a Comment

Containing and hiding information about an object, such as internal data structures and code.

Article written by urooj

© PHPInterviewQuestion.com 2009 - 2010

eXTReMe Tracker