Your SlideShare is downloading. ×
0
Disclaimer: This presentation is prepared by trainees ofbaabtra as a part of mentoring program. This is not officialdocume...
OOP’s concept Abstraction& EncapsulationAnupa GopinathAnupa.gopi@gmail.comwww.facebook.com/anupa.gopinath9#twitter.com/anu...
Abstraction• Abstraction is the process or result ofgeneralization by reducing the informationcontent of a concept or an o...
Functional Abstraction vs.Data Abstraction• Functional abstraction means that a function can beused without taking into ac...
• Data Abstraction means that data can be usedwithout taking into account how the data arestored.• Example-when we make us...
Encapsulation• it is a process of binding or wrapping the dataand the codes that operates on the data into asingle entity....
• Encapsulation defines the access levels for elements of thatclass. These access levels define the access rights to theda...
If this presentation helped you, please visit ourpage facebook.com/baabtra and like it.Thanks in advance.www.baabtra.com |...
Contact Us
OOP’s concept Abstraction & Encapsulation
Upcoming SlideShare
Loading in...5
×

OOP’s concept Abstraction & Encapsulation

5,986

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
5,986
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
41
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "OOP’s concept Abstraction & Encapsulation "

  1. 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. 2. OOP’s concept Abstraction& EncapsulationAnupa GopinathAnupa.gopi@gmail.comwww.facebook.com/anupa.gopinath9#twitter.com/anupa.gopinathin.linkedin.com/in/anupa.gopinath9633591614
  3. 3. Abstraction• Abstraction is the process or result ofgeneralization by reducing the informationcontent of a concept or an observablephenomenon, typically in order to retain onlyinformation which is relevant for a particularpurpose
  4. 4. Functional Abstraction vs.Data Abstraction• Functional abstraction means that a function can beused without taking into account how the function isimplemented.• Example-• <iostream.h>: cin, cout, endl, setprecision( ), setw( )• <string.h>: strcat( ), strcmp( ), strcpy( ), strlen( )• <math.h>: ceil( ), sin( ), exp( ), log( ), pow( ), sqrt( )
  5. 5. • Data Abstraction means that data can be usedwithout taking into account how the data arestored.• Example-when we make use of data types ,wedon’t care how the data are stored, but onlywhat operations are provided and whatproperties are supported.• int i, j, k;• Float y,l;
  6. 6. Encapsulation• it is a process of binding or wrapping the dataand the codes that operates on the data into asingle entity. This keeps the data safe fromoutside interface and misuse. One way tothink about encapsulation is as a protectivewrapper that prevents code and data frombeing arbitrarily accessed by other codedefined outside the wrapper.
  7. 7. • Encapsulation defines the access levels for elements of thatclass. These access levels define the access rights to thedata, allowing us to access the data by a method of thatparticular class itself, from an inheritance class, or evenfrom any other class. There are three levels of access:• public: functions of all classes may access the data ormethods of a class that is defined with the public accesslevel. This is the lowest level of data protection• protected: data access is restricted to functions ofinheritance classes, i.e. member functions of that class andall sub-classes• private: data access is restricted to methods of thatparticular class only. This is the highest level of dataprotection
  8. 8. If this presentation helped you, please visit ourpage facebook.com/baabtra and like it.Thanks in advance.www.baabtra.com | www.massbaab.com |www.baabte.com
  9. 9. Contact Us
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×