Your SlideShare is downloading. ×
Object Oriented Programming
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

Object Oriented Programming

790

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
790
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
9
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. Disclaimer: This presentation is prepared by trainees ofbaabtra as a part of mentoring program. This is not officialdocument of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .Ltd
  • 2. OOP’s concept Abstraction & Encapsulation Anupa Gopinath Anupa.gopi@gmail.com www.facebook.com/anupa.g opinath9# twitter.com/anupa.gopinath in.linkedin.com/in/anupa.gop inath 9633591614
  • 3. Abstraction• Abstraction is the process or result of generalization by reducing the information content of a concept or an observable phenomenon, typically in order to retain only information which is relevant for a particular purpose
  • 4. Functional Abstraction vs. Data Abstraction• Functional abstraction means that a function can be used without taking into account how the function is implemented.• Example-• <iostream.h>: cin, cout, endl, setprecision( ), setw( )• <string.h>: strcat( ), strcmp( ), strcpy( ), strlen( )• <math.h>: ceil( ), sin( ), exp( ), log( ), pow( ), sqrt( )
  • 5. • Data Abstraction means that data can be used without taking into account how the data are stored.• Example-when we make use of data types ,we don’t care how the data are stored, but only what operations are provided and what properties are supported.• int i, j, k;• Float y,l;
  • 6. Encapsulation• it 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.
  • 7. • Encapsulation defines the access levels for elements of that class. These access levels define the access rights to the data, allowing us to access the data by a method of that particular class itself, from an inheritance class, or even from any other class. There are three levels of access:• public: functions of all classes may access the data or methods of a class that is defined with the public access level. This is the lowest level of data protection• protected: data access is restricted to functions of inheritance classes, i.e. member functions of that class and all sub-classes• private: data access is restricted to methods of that particular class only. This is the highest level of data protection
  • 8. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance.www.baabtra.com | www.massbaab.com |www.baabte.com
  • 9. Contact Us

×