Pages

Sunday 11 September 2011

Abstract Data Types (2)


  • All built-in primitive data types are in fact abstrat data types
  • In floating point type, for example we cannot add a new operation, say, exponentiation
  • We cannot enhance or shrink the set of allowed values
  • ADT does not specify how the data structure would be coded
  • It does not describe whether data elements are stored in consecutive or disjoint locations
  • The implementation details are hidden from the application program
In software module, an ADT can be viewed as layer between application that uses it and a component that implements ADT.

Some high level languages provide support for ADT in different ways
  • C has built-in struct type
  • In C++, a class construct can be used
  • In Java, an ADT can be expressed as Interface

No comments:

Post a Comment