SHALINI KUMARI
SNEHA PRASAD
RUCHI GUPTA
2nd yr C.S.
 INTRODUCTION
 PRINCIPLE
 CHARACTERISTICS
 IMPLEMENTATION
 FLOW CHART
 PROGRAM OF ENCAPSULATION
 BENEFITS
 ABSTRACTION v/s ENCAPSULATION
 USES
 CONCLUSION
Encapsulation refers to the creation
of self-contained modules that bind
processing functions to the data.
These user-defined data types are
called "classes," and one instance of a
class is an "object “.
Encapsulation is a process of
binding or wrapping the data and the
codes that operates on the data into a
single entity. This keeps the data safe
from outside interface and misuse. One
way to think about encapsulation is as a
protective wrapper that prevents code
and data from being arbitrarily accessed
by other code defined outside the
wrapper..
 Improves the Understandability
of the Application.
Enhanced Security
Maintenance of Application
Easier
Encapsulation is most often achieve
through information hiding , which is the
process of hiding all the secret of an
object that do not contribute to its
essential characteristics,the structure of
an object hidden, as well as the
implementation of its method. Only the
essential characteristics of object are
visible.
#include<iostream.h>
#include<conio.h>
class college
{
private:
int ccode;
char cname[20];
public:
read()
{
cout<<“enter the ccode and cname”;
cin>>ccode>>cname;
}
write()
{
cout<<“code=“<<ccode<<endl;
cout<<“name=“<<cname;
}
};
void main()
{
clrscr();
college c1; // object declaration
c1.read(); // function calling
c2.write();
getch();
}
 To allow one class ("server") to
make a contract with another
class(client) .
 Data and Function may be public or
private.
 It hides the complexity from the
implementation.
 It also provide inter independencies.
Abstraction focuses upon the
observable behavior of on object
whereas….
Encapsulation focuses upon
implementation that gives rise to
this behavior.
 Through encapsulation , an interface is
made available to world through which
users can use the class .
It is the one of the important
feature of oop. It is used to wrap
the data and function together in
a single unit. Thus, it also
provide inter independencies.
encapsulation

encapsulation

  • 1.
  • 2.
     INTRODUCTION  PRINCIPLE CHARACTERISTICS  IMPLEMENTATION  FLOW CHART  PROGRAM OF ENCAPSULATION  BENEFITS  ABSTRACTION v/s ENCAPSULATION  USES  CONCLUSION
  • 3.
    Encapsulation refers tothe creation of self-contained modules that bind processing functions to the data. These user-defined data types are called "classes," and one instance of a class is an "object “.
  • 4.
    Encapsulation is aprocess of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. One way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper..
  • 5.
     Improves theUnderstandability of the Application. Enhanced Security Maintenance of Application Easier
  • 6.
    Encapsulation is mostoften achieve through information hiding , which is the process of hiding all the secret of an object that do not contribute to its essential characteristics,the structure of an object hidden, as well as the implementation of its method. Only the essential characteristics of object are visible.
  • 7.
    #include<iostream.h> #include<conio.h> class college { private: int ccode; charcname[20]; public: read() { cout<<“enter the ccode and cname”; cin>>ccode>>cname; } write() { cout<<“code=“<<ccode<<endl; cout<<“name=“<<cname; } };
  • 8.
    void main() { clrscr(); college c1;// object declaration c1.read(); // function calling c2.write(); getch(); }
  • 9.
     To allowone class ("server") to make a contract with another class(client) .  Data and Function may be public or private.  It hides the complexity from the implementation.  It also provide inter independencies.
  • 10.
    Abstraction focuses uponthe observable behavior of on object whereas…. Encapsulation focuses upon implementation that gives rise to this behavior.
  • 11.
     Through encapsulation, an interface is made available to world through which users can use the class .
  • 12.
    It is theone of the important feature of oop. It is used to wrap the data and function together in a single unit. Thus, it also provide inter independencies.