0% found this document useful (0 votes)
16 views

1.5. Why Study Data Structures and Abstract Data Types - Problem Solving With Algorithms and Data Structures

1. Abstract data types (ADTs) allow programmers to model problem domains at a high level without focusing on implementation details. This abstraction hides complexity and improves the problem-solving process. 2. An ADT defines the logical view of data and operations without specifying how they will be implemented physically. It encapsulates the data implementation behind an interface. 3. The implementation of an ADT, often a data structure, provides the physical representation of the data using programming constructs. This separation of logical and physical views provides implementation independence and allows switching implementations without changing the user interface.

Uploaded by

Err33
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

1.5. Why Study Data Structures and Abstract Data Types - Problem Solving With Algorithms and Data Structures

1. Abstract data types (ADTs) allow programmers to model problem domains at a high level without focusing on implementation details. This abstraction hides complexity and improves the problem-solving process. 2. An ADT defines the logical view of data and operations without specifying how they will be implemented physically. It encapsulates the data implementation behind an interface. 3. The implementation of an ADT, often a data structure, provides the physical representation of the data using programming constructs. This separation of logical and physical views provides implementation independence and allows switching implementations without changing the user interface.

Uploaded by

Err33
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1.5. Why Study Data Structures and Abstract Data Types?

Problem
6/11/17,
... 6:34 PM

1.5. Why Study Data Structures and


Abstract Data Types?
To manage the complexity of problems and the problem-solving process, computer scientists use
abstractions to allow them to f ocus on the big picture w ithout getting lost in the details. By creating
models of the problem domain, w e are able to utilize a better and more eff icient problem-solving
process. These models allow us to describe the data that our algorithms w ill manipulate in a much more
consistent w ay w ith respect to the problem itself .

Earlier, w e ref erred to procedural abstraction as a process that hides the details of a particular f unction
to allow the user or client to view it at a very high level. We now turn our attention to a similar idea, that
of data abs traction. An abs tract data type , sometimes abbreviated ADT, is a logical description of
how w e view the data and the operations that are allow ed w ithout regard to how they w ill be
implemented. This means that w e are concerned only w ith w hat the data is representing and not w ith
how it w ill eventually be constructed. By providing this level of abstraction, w e are creating an
e ncaps ulation around the data. The idea is that by encapsulating the details of the implementation, w e
are hiding them f rom the users view . This is called inform ation hiding.

Figure 2 show s a picture of w hat an abstract data type is and how it operates. The user interacts w ith
the interf ace, using the operations that have been specif ied by the abstract data type. The abstract
data type is the shell that the user interacts w ith. The implementation is hidden one level deeper. The
user is not concerned w ith the details of the implementation.

(../_images/adt.png)

The implementation of an abstract data type, of ten ref erred to as a data s tructure , w ill require that w e
provide a physical view of the data using some collection of programming constructs and primitive data
types. As w e discussed earlier, the separation of these tw o perspectives w ill allow us to def ine the
complex data models f or our problems w ithout giving any indication as to the details of how the model
w ill actually be built. This provides an im ple m e ntation-inde pe nde nt view of the data. Since there
w ill usually be many diff erent w ays to implement an abstract data type, this implementation
independence allow s the programmer to sw itch the details of the implementation w ithout changing the
w ay the user of the data interacts w ith it. The user can remain f ocused on the problem-solving
process.

1 of 1

You might also like