This week we have looked into the introductory concepts and terms that are core to the learning of
the Data structures and Algorithms class. In this discussion, I will share my understanding of some of
the terms listed and how they interlink within the scope of Data Structures and Algorithms.
Type
A type is simply a collection of values (Shaffer, 2011, p.8). It is generally a value that can be held by
a variable and later implemented as a data type (this involves operations that can be performed on the
type). An example of a simple type can be a string that does not include any subtypes (Shaffer, 2011,
p.8). A type can also be aggregate or composite in which case it holds multiple subtypes of other
information. An example is a type that contains information on a bank account (Shaffer, 2011, p.8).
Data Item
A data item is a piece of information or a record whose value is drawn from
a type (Shaffer, 2011, p.8). It is any single unit of data that can be retrieved from a type. This can range
from a name in a person's record, or their account number instead.
Data Type
A data type is a type together with a collection of operations to manipulate
the type (Shaffer, 2011, p.8). The concept of a data type involves a type and all the corresponding
actions and operations that can be performed on the type. In programming, a data type can have
operations such as methods/functions that manipulate it.
Abstract Data Type
As defined by Shaffer, "[a]n abstract data type (ADT) is the realization of a data type as a software
component" (2011, p.8). Although this is a correct definition, I find it a bit unsatisfying in explaining
what an ADT is. A more precise ADT definition is derived from the concept of abstraction itself. The
data type hides how it's implemented but makes available methods and functions that can e used on
them. The user does not have to understand how they work but only knows how to use the data types.
Data Structure
A data structure is the whole implementation of our data type (Shaffer, 2011, p.8). This is usually
hidden from the user.
Class
A class is a combination of an ADT and all the implementations it processes. These can be methods
and attributes it makes available.
Member Function
Functions defined within a class are local and available to the class they belong to and they are
usually referred to as methods and or member functions.
Data Members
Shaffer defined a data member as "a variable that defines the space required by a data item are
referred to as data members.(2011, p.8)". They are variables and attributes that are defined within an
already defined class.
References
Shaffer, C. (2011). A Practical Introduction to Data Structures and Algorithm Analysis. Blacksburg:
Virginia. Tech