User talk:Varma.c17

Encapsulation(object oriented programming)
Encapsulation is the combination of Abstraction and Data hiding. --If any component will follows data hiding and abstraction then such component is said to be encapsulated component. ENCAPSULATION=DATA HIDING+ABSTRACTION

The advantages of encapsulation are: 1)Security 2)Enhancement will be easy without effecting the people who are using. 3)It improves maintainability

-- In encapsulation class we have to declare data members as private and for every data member we have to provide public getter and setter methods. By using these methods only outside person can able to access our data i.e.,hiding data behind methods is the central concept of encapsulation.

-- The main limitation of encapsulation is it increases length of the code and slows down execution.

Ex: class Account {       private double amount; public double getAmount {             //validate user; return amount; }       public void setAmount {            //validate user; this.amount=amount; }        }