Re: repost:adt vs aggregation (cross-posted)

From: Mike Mohr <Mike.Mohr_at_aut.ac.nz>
Date: Tue, 12 Feb 2002 21:56:06 GMT
Message-ID: <3C698F79.30CD2067_at_aut.ac.nz>


Cagdas Ozgenc wrote:

> Greetings.
>
> What is the difference between an abstract data type vs. a type constucted
> using aggregation (aggregation used in the context of data models such as
> E/R, GSM, FDM, etc)?
>
> Should we treat them separately or equivalently? What's your opinion?
>
> Thanks for taking time.

If we consider the classic dictionary definitions:


abstract data type

<programming> (ADT) A type whose internal form is hidden behind a set of access functions. Objects of the type are created and inspected only by calls to the access
functions. This allows the implementation of the type to be changed without requiring any changes outside the module in which it is defined.

Abstract data types are central to object-oriented programming where every class is an ADT.

A classic example of an ADT is a stack data type for which functions might be provided to create an empty stack, to push values onto a stack and to pop values from a stack.

aggregation

<programming> A composition technique for building a new object from one or more existing objects that support some or all of the new object's required interfaces.



The difference appears to be the modules used to limit the abstraction. I believe the scope of E/R, FDM, etc. goes beyond modules to the application or distributed application at the end of the family heirarchy of object classes.
Mike Mohr, Systems Administrator  === Email: Mike.Mohr_at_aut.ac.nz
Information Technology Group      === Phone: 64 9 917-9999 x8133
Auckland University of Technology === Fax:   64 9 917-9901
PO Box 92006, Auckland, New Zealand =
http://home.aut.ac.nz/staff/mmohr/

Chaos reigns within. Repent, reflect, reboot. Order shall return. Received on Tue Feb 12 2002 - 22:56:06 CET

Original text of this message