This section contains 194 words (approx. 1 page at 300 words per page) |
Aggregate data types are any types of data that can be referenced as a single entity, but that also consist of more than one piece of data. The data, which is related, is kept together in a way that addresses that relationship. Examples of aggregate data are strings, arrays, classes, and structures.
Strings (sequences of characters) and arrays (collections of like elements) are homogeneous aggregate data types--the multiple values are all of the same data type. Classes (definitions of common properties of the different constituent objects) and structures are heterogeneous aggregate data types--the multiple values can be of different data.
There are advantages to organizing data as an aggregate data type. The data can be used more effectively and easily, because a level of organization has been imposed on the data. More complicated arrangements of data may be defined. Likewise, this organization renders the data easier to interpret and maintain.
Aggregate data types exist in the various programming languages. In C, they are known as structs, whereas other languages label aggregate data types as records or objects. In C++, the objects can contain functions as well as data.
This section contains 194 words (approx. 1 page at 300 words per page) |