Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 12th, 2008, 12:47 PM   #1
code_warrior
Newbie
 
Join Date: Jan 2008
Posts: 2
Rep Power: 0 code_warrior is on a distinguished road
Send a message via MSN to code_warrior
What are abstract data types?

if it isn't too much, could someone please help clarify why abstact data types create a layer boundary between modules. i also don't understand too much about why it is such a valuable approach and how it can be implemented in a language like c++ or java. also why is it useful to hide data and the code that processes the data.

Thanks for your time.
Code_Warrior
code_warrior is offline   Reply With Quote
Old Jan 12th, 2008, 4:04 PM   #2
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5 grumpy is on a distinguished road
Re: What are abstract data types?

Abstract data types allow definition of a fixed interface (method of interaction) between modules. If there is not a fixed interface (i.e. the interface can change) between two modules then any change in one module can cause code in the other module to function incorrectly, forcing a need to retest (confirm if anything is functioning incorrectly) and then, if errors are encountered, to correct both modules whenever one changes. That translates into significantly more effort to maintain both modules, or to get them working correctly in the first place.

Data and code hiding simply means that the implementation details in one module are not made visible to other modules (i.e. there is a fixed interface).

I'll leave the question of implementing abstract data types or data/code hiding as a further exercise: there are many ways of doing that in both languages.
grumpy is offline   Reply With Quote
Old Jan 12th, 2008, 8:07 PM   #3
peaceofpi
hi: for(;;) goto hi;
 
peaceofpi's Avatar
 
Join Date: Jun 2006
Posts: 92
Rep Power: 3 peaceofpi is on a distinguished road
Send a message via AIM to peaceofpi Send a message via MSN to peaceofpi
Re: What are abstract data types?

First post, a peculiarly worded set of questions...

I smell homework!
__________________
How do you play Religious Roulette?
Stand around in a circle and blaspheme till someone gets struck by lightning.
peaceofpi is offline   Reply With Quote
Old Jan 13th, 2008, 1:10 AM   #4
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5 grumpy is on a distinguished road
Re: What are abstract data types?

Quote:
Originally Posted by peaceofpi View Post
I smell homework!
As do I; one reason I did not provide a complete answer (he'll need to work to properly understand the notion of interface) and also did not provide examples. The original poster will need to think and understand before he can use my words.
grumpy is offline   Reply With Quote
Old Jan 13th, 2008, 1:19 AM   #5
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,885
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Re: What are abstract data types?

Ah, no wonder Grumpy's post was abnormally brief!

(For his standards, of course)
Sane is offline   Reply With Quote
Old Jan 13th, 2008, 1:42 AM   #6
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5 grumpy is on a distinguished road
Re: What are abstract data types?

Ah, Sane, I'd like to show you the "V for victory" sign that your President Bush showed to the Australian people while visiting Canberra in 1992.
grumpy is offline   Reply With Quote
Old Jan 13th, 2008, 6:04 PM   #7
code_warrior
Newbie
 
Join Date: Jan 2008
Posts: 2
Rep Power: 0 code_warrior is on a distinguished road
Send a message via MSN to code_warrior
Re: What are abstract data types?

actually grumpy's answer was pretty enlightening. as far as homework goes.....i don't know yet, my semester is starting tomarrow and i wanna get a head start on my data structures class by atleast getting a little bit of understanding on something that im sure i might have a problem with.

thanks.
code_warrior is offline   Reply With Quote
Old Jan 14th, 2008, 3:31 PM   #8
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,033
Rep Power: 5 lectricpharaoh will become famous soon enough
Re: What are abstract data types?

Quote:
Originally Posted by grumpy
Ah, Sane, I'd like to show you the "V for victory" sign that your President Bush showed to the Australian people while visiting Canberra in 1992.
Sane, like me, is Canadian, not American. Our President Bush, indeed!
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote
Old Jan 15th, 2008, 1:15 AM   #9
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5 grumpy is on a distinguished road
Re: What are abstract data types?

Only Canadians believe Canada is not part of the US!!!!
grumpy is offline   Reply With Quote
Old Jan 15th, 2008, 8:49 AM   #10
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Re: What are abstract data types?

I'm American, but he isn't my president... I don't claim him.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
convert unarrenged .txt data to arrange .txt data pastalover Visual Basic 2 Jun 23rd, 2006 4:22 PM
C# Datetime data types King C# 2 Jun 4th, 2006 11:21 PM
Recommended Practice for returning data from function Arla C# 1 Aug 16th, 2005 12:21 PM
help with sockets, having a client recieve data as well as send. cypherkronis Python 7 Jul 1st, 2005 5:59 PM
Data Types Ashok ASP 1 Jun 19th, 2005 12:11 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:07 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC