CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 28

Threaded View

  1. #13
    Join Date
    Nov 2003
    Posts
    1,405

    Re: Abstract VS Encapsulation

    Quote Originally Posted by laserlight View Post
    Who won the first round?
    I did but as nobody seemed willing to surrender to my genius I had to put in an entry also in the second round.

    As much as I like your definitions, that sounds like a bold claim. On what grounds do you say that they are "the definite definitions" with respect to OO programming instead of merely being your definitions?
    It was a joke because unfortunately there are no definite definitions. Not even OO itself has a widely agreed upon definition.

    To be bold, I think my definitions come very close to what many seasoned programmers could agree with. I've polished on them over a period of ten years since I went from C to Java and now to C++. I'm very proud of them so here they are again:

    * Encapsulation is the idea of separating type and implementation from each other so they can be considered separately. The type is the outside view of an encapsulated entity. Hidden inside resides the implementation, a specific realization of the type.

    * Abstraction is the process of defining a type. The type is used to declare variables which hold data and therefore a type is also called a data abstraction.

    But, as always, I wellcome critisism of course.
    Last edited by _uj; January 22nd, 2009 at 05:43 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured