UMBC CS 201, Fall 98
Abstract Data Types
Definitions
In general we think of an abstract data type as a type defined in terms
of its behavior rather than its implementation.
Technically, we define an abstract data type as a mathematical object and
the operations on that object.
Example :
Strings
ADT
A string is a group of characters that are thought of as a
single object. The operations on strings include :
- finding its length
- concatenation
- copying one string into another
- comparing two strings for equality or for alphabetic ordering
- etc.
Implementation of a string:
A string in C is an array of characters that is pointed to by a pointer
whose variable name is the name of the array. The string can be indexed
like other arrays. A string is special, because its last character has
to be the null terminator.
Strings have many operations on them. Those operations have been written
for us and are found in the string library.
CSEE
|
201
|
201 F'98
|
lectures
|
news
|
help
Sunday, 15-Nov-1998 17:05:33 EST