Your SlideShare is downloading. ×
encapsulation
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

encapsulation

1,902
views

Published on

Published in: Technology, Education

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,902
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
32
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. SHALINI KUMARI SNEHA PRASAD RUCHI GUPTA 2nd yr C.S.
  • 2.  INTRODUCTION  PRINCIPLE  CHARACTERISTICS  IMPLEMENTATION  FLOW CHART  PROGRAM OF ENCAPSULATION  BENEFITS  ABSTRACTION v/s ENCAPSULATION  USES  CONCLUSION
  • 3. 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 “.
  • 4. 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..
  • 5.  Improves the Understandability of the Application. Enhanced Security Maintenance of Application Easier
  • 6. 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.
  • 7. #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; } };
  • 8. void main() { clrscr(); college c1; // object declaration c1.read(); // function calling c2.write(); getch(); }
  • 9.  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.
  • 10. Abstraction focuses upon the 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 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.

×