Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

Difference Between Data Abstraction and Data Encapsulation

Share this post!
 Vote this!

Data Abstraction means something like this :
  1. //Shape provides no implementation of the draw functions
  2. //It abstracts the draw function from other shapes meaning that it
  3. //defines functions that all type of shapes should necessarily have.
  4. class Shape{
  5. public: virtual void draw()const=0;
  6. };
  7. class Ellipse : Shape{
  8. public: void draw()const{ API.drawEllipse(); }
  9. };
   more...

0 comments:

Post a Comment