|
-
Sep 25th, 2006, 01:06 AM
#1
Thread Starter
PowerPoster
[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
-
Sep 25th, 2006, 04:37 AM
#2
Lively Member
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.
-
Sep 25th, 2006, 04:48 AM
#3
Thread Starter
PowerPoster
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
-
Sep 25th, 2006, 04:55 AM
#4
Lively Member
Re: Definition for Abstraction
 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.
-
Sep 25th, 2006, 05:09 AM
#5
Thread Starter
PowerPoster
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
-
Sep 25th, 2006, 05:10 AM
#6
Thread Starter
PowerPoster
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
-
Sep 25th, 2006, 07:25 AM
#7
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
-
Sep 25th, 2006, 11:18 PM
#8
Thread Starter
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|