Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

What is an "Abstract Data Type"?
Hi, together!

I know that there are so called

1. Fundamental Data Types
2. Reference Data Types

in Java - now somebody asked me the question: "What is an Abstract Data
Type??". Does anyone of you know? I didn't find an answer, I looked into
the www, into my books... nothing!

Thanks in advance
Pascal





Report this thread to moderator Post Follow-up to this message
Old Post
Pascal
01-19-05 09:20 PM


Re: What is an "Abstract Data Type"?
Pascal wrote:
> Hi, together!
>
> I know that there are so called
>
> 1. Fundamental Data Types
> 2. Reference Data Types
>
> in Java - now somebody asked me the question: "What is an Abstract Data
> Type??". Does anyone of you know? I didn't find an answer, I looked into
> the www, into my books... nothing!

Strange, I just typed "abstract data type" in google and I had thousands
of results. Here is one:

http://en.wikipedia.org/wiki/Abstract_data_type

Report this thread to moderator Post Follow-up to this message
Old Post
Andrea Desole
01-19-05 09:20 PM


Re: What is an "Abstract Data Type"?
Thank you very much, I don't know, but I really looked hours into the
www, searching with google, Copernic...etc, but I didn't find such an
easy explanation:

Abstract Data Type == Synonym for Interface

Thanks!



Andrea Desole schrieb:

> Pascal wrote:
> 
>
>
> Strange, I just typed "abstract data type" in google and I had thousands
> of results. Here is one:
>
> http://en.wikipedia.org/wiki/Abstract_data_type


Report this thread to moderator Post Follow-up to this message
Old Post
Pascal
01-19-05 09:20 PM


Re: What is an "Abstract Data Type"?
An abstract data type is really about encapsulation. The "user" of the
datatype should not be concerned about the internal "management" of the
object. He only needs to know about the methods available to him in order to
use the class. I.e. all details are hidden. That's why they call it
"abstract".

David.


"Pascal" <news@pbouygues.de> wrote in message
news:cslvd7$ovi$1@news.BelWue.DE...
> Thank you very much, I don't know, but I really looked hours into the
> www, searching with google, Copernic...etc, but I didn't find such an
> easy explanation:
>
> Abstract Data Type == Synonym for Interface
>
> Thanks!
>
>
>
> Andrea Desole schrieb:
> 
into 
>



Report this thread to moderator Post Follow-up to this message
Old Post
David Van de Voorde
01-19-05 09:20 PM


Re: What is an "Abstract Data Type"?
Pascal wrote:
> Thank you very much, I don't know, but I really looked hours into the
> www, searching with google, Copernic...etc, but I didn't find such an
> easy explanation:

well, maybe a typo, can happen.

>
> Abstract Data Type == Synonym for Interface

this is a more "implementation oriented" way to look at it, specially if
you are using Java. However, you can define an ADT without using
interfaces (some languages don't even have interfaces).
A better way to look at it is to look at the operations you can do on
that type, like a kind of "protocol" the type exposes. An interface is a
good way to do that, but just don't think that ADT=interface, at least
not in the Java sense.

Report this thread to moderator Post Follow-up to this message
Old Post
Andrea Desole
01-19-05 09:20 PM


Re: What is an "Abstract Data Type"?
Thanks for the good answers - well, the problem is that I don't know
other OOP-languages than Java, so I can't compare Abstract Data Types
realized in other languages; but nevertheless I got an impression what
it depicts. Danke!


Report this thread to moderator Post Follow-up to this message
Old Post
Pascal
01-19-05 09:20 PM


Re: What is an "Abstract Data Type"?
On Wed, 19 Jan 2005 16:23:57 +0100, Pascal wrote:


> in Java - now somebody asked me the question: "What is an Abstract Data
> Type??". Does anyone of you know? I didn't find an answer, I looked into
> the www, into my books... nothing!

Well, it has been some time since my CS1 lectures, but i would define an
ADT as Data + Operations defined upon the Data. It is the "Skeleton" of
some concrete data type, that defines what the data represents, and how it
can be used. As such, it is more of a concept then any actual item you
will find in a programming language, though java's interfaces come close.


--
In pioneer days they used oxen for heavy pulling, and when one ox
couldn't budge a log, they didn't try to grow a larger ox. We shouldn't
be trying for bigger computers, but for more systems of computers.
--- Rear Admiral Grace Murray Hopper


Report this thread to moderator Post Follow-up to this message
Old Post
Stefan Schulz
01-19-05 09:20 PM


Re: What is an "Abstract Data Type"?
"David Van de Voorde" <david.vandevoorde.nospam@gmail.com> wrote in message
news:41ee83f5$0$44078$5fc3050@dreader2.news.tiscali.nl...
> An abstract data type is really about encapsulation. The "user" of the
> datatype should not be concerned about the internal "management" of the
> object. He only needs to know about the methods available to him in order
> to
> use the class. I.e. all details are hidden. That's why they call it
> "abstract".
>
>  David.
>
>
> "Pascal" <news@pbouygues.de> wrote in message
> news:cslvd7$ovi$1@news.BelWue.DE... 
> into 
>
>

Well, in a classic sense an abstract data type is quite different from
abstraction/encapsulation which I think David and Andrea are talking about.
An abstract data type, according to the definition below would be
implementation independent. The most common ADT would be a stack, heap or
queue, which can be implemented in an OOP manner or a procedural manner in
just about (if not all) languages. The data type is a stack, but it isn't a
primitave data type. Now the interesting question to chew on would be
according to this definition, would a Date be a primitave data type? I would
say yes because it can be implemented in several manners such as Julian
date, Delphi/Julian date (TDate/TDateTime), Calendar, Gregorian Calendar,
etc. Ahh, this brings me back to the good 'ole college days.

http://www.nist.gov/dads/HTML/abstractDataType.html

--
Tom Dyess
OraclePower.com



Report this thread to moderator Post Follow-up to this message
Old Post
Tom Dyess
01-20-05 01:56 PM


Re: What is an "Abstract Data Type"?
Tom Dyess wrote:

> Well, in a classic sense an abstract data type is quite different from
> abstraction/encapsulation which I think David and Andrea are talking about.[/color
]

I'm not sure. I would probably agree on the encapsulation, but
abstraction is just the definition of the behaviour of an object,
indepedent of what the implementation or the inner features are. This is
pretty close to the meaning of ADT.
And the name ADT itself implies abstraction :-)


> An abstract data type, according to the definition below would be
> implementation independent. The most common ADT would be a stack, heap or
> queue, which can be implemented in an OOP manner or a procedural manner in
> just about (if not all) languages. The data type is a stack, but it isn't 
a
> primitave data type. Now the interesting question to chew on would be
> according to this definition, would a Date be a primitave data type? I wou
ld
> say yes because it can be implemented in several manners such as Julian
> date, Delphi/Julian date (TDate/TDateTime), Calendar, Gregorian Calendar,
> etc. Ahh, this brings me back to the good 'ole college days.

well, in this case the first question would be: what is a primitive data
type?

Report this thread to moderator Post Follow-up to this message
Old Post
Andrea Desole
01-20-05 01:57 PM


Re: What is an "Abstract Data Type"?
> well, in this case the first question would be: what is a primitive data
> type?

Well, that's the interesting thing. Every object (as far as I can think of)
boils down to a aggregation of primitive data types, even if it is
aggregating object as well, because those objects boil down to primitives.
Delphi/Julian stores dates in the form of double with the whole numbers
representing days past a base date and the fraction representing the
fraction of a day. Gregorian/Java dates are stored as a long and represent
the number of milliseconds past a base date, so essentially, yes, they are
primitive data types, but no different than any other structure/object.

Concerning the ADT, back in high school days (late 80's early 90's) ADT was
always a conceptual structure only, like a stack/heap/queue. They were
defined by algorithmic pseudocode and could be implemented any way you like
as long as they followed the conceptual algorithm (has a pop, has a push,
LIFO, etc). Now, can they be implemented as an abstract class, with the pop
and push defined but not implemented therefore making it an abstract class,
but I think the two definitions are different with the common word
"abstract" in them. Granted, the early 90's have long since past and ADT
could have been anointed a new definition. As always though, I could be
wrong. :)

---
Tom Dyess
OraclePower.com



Report this thread to moderator Post Follow-up to this message
Old Post
Tom Dyess
01-20-05 08:58 PM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

Java Programmer archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:28 AM.

 

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.