Results 1 to 8 of 8

Thread: [RESOLVED] Definition for Abstraction

  1. #1

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Resolved [RESOLVED] Definition for Abstraction

    Hi,

    I'm confusing with concept "Abstraction". I go through few articles on the web and consider it as follows.

    "Abstraction is a process which software developer consider about an object in terms of its functionality. No need to worry about its implementing details"

    Can you guys comment on this?
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  2. #2
    Lively Member
    Join Date
    Jun 2002
    Posts
    70

    Re: Definition for Abstraction

    Hi eranga!
    You may think of abstraction as a way of making good documentation for your methods, before implementing them.

    Say you write some code, and someone else is to change it! It would be optimal for this other person that your methods is well documented, so that he/she does not have to sit down and study your code. It will save him/her some time, right?

    With the use of procedural abstraction, you specify each method clearly before you implement it. By specifying post- and preconditions, as well as the method's parameters, others will be able to use the method without studying the implementation. In fact, you do this every time you use a method from the Java API. Have you ever looked at the code for 'println()' or 'sqrt'?!

    So, in shorter terms, you have to find out what your methods are going to do, before you think of how they are going to do it.

  3. #3

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Re: Definition for Abstraction

    Dear Mutuz,
    How nice your comment. Thanks a lot.

    You said that APIs are doing this. I mean, everyone can used those APIs without worring about its implimentation. Isn't it?
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  4. #4
    Lively Member
    Join Date
    Jun 2002
    Posts
    70

    Re: Definition for Abstraction

    Quote Originally Posted by eranga262154
    You said that APIs are doing this. I mean, everyone can used those APIs without worring about its implimentation. Isn't it?
    Yes, you have learned how to use certain methods by reading the API. This is because the API describes the methods/classes so well, that you don't have to look at it's code.

  5. #5

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Re: Definition for Abstraction

    Ok thanks Mutuz, Now i got the point.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  6. #6

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Re: Definition for Abstraction

    If I want to look-at APIs code what should I do?
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  7. #7
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: Definition for Abstraction

    Abstraction

    To take a look at the API code, unzip the "src.zip" file in the JDK folder, it has all java source code
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  8. #8

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Re: Definition for Abstraction

    Thanks for your link on wikipedia. I also refer the same page.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

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