Abstract Data Types

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/7

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

8 Terms

1
New cards

The facilities and functionality of an Abstract Data Type (ADT) - What it does

As users of an ADT, it is important to understand what the functionality is and how we can access that functionality

2
New cards

The data structure employed by the ADT - How it does what it does

As programmers of an ADT, we need to understand what options are available to implement an ADT, evaluate them and pick the best one

3
New cards

The implementation of the data structure - How it is stored and manipulated

As Computer Scientists, we should understand the basics of the data structure

4
New cards

Why ‘Abstract’

The definition of an ADT only mentions what operations can be performed but not how these operations will be implemented

The ADT does not specify how the data will be organised in memory, or the algorithms to be used for implementing the operations

Abstract because it is an implementation independent view

The process of providing only the necessary information and hiding the internal details is known as abstraction

5
New cards

Difference between Data Structures and an ADT

A data structure is the physical representation of the structure of the data being stored in memory

An abstract data type is both the data structure and the procedures/functions which manipulate that data structure

<p>A data structure is the physical representation of the structure of the data being stored in memory</p><p>An abstract data type is both the data structure and the procedures/functions which manipulate that data structure</p>
6
New cards

Level of Support for ADTs

The level of support for ADTs differs among programming languages

Most languages will allow us to introduce data structures as user-defined types

  • this is a minimal level of support

Some languages will allow us to encapsulate the data structure and offer operations as part of the definition of the ADT

7
New cards

Encapsulation

The only way the user can interact with a variable of that ADT is through an interface, a set of procedures that operate on the data structure

The user cannot directly manipulate the physical stored data structure

<p>The only way the user can interact with a variable of that ADT is through an interface, a set of procedures that operate on the data structure</p><p>The user cannot directly manipulate the physical stored data structure</p>
8
New cards

‘Strong’ Encapsulation

If the encapsulation is “strong” then details of how the data structure is actually stored can be completely hidden from the user

The user will have a conceptual (or “abstract”) understanding of what the ADT does, not how it does it