0% found this document useful (0 votes)
12 views5 pages

DS - Unit1 Powerpoint-1

This document discusses abstract data types in programming languages. It explains that data types can be simple, like integers, or complex, like objects and lists. Complex data types are constructed from multiple simple types. The document also introduces the concepts of abstraction and procedural abstraction. Procedural abstraction allows using functions without knowing their implementation details.

Uploaded by

Jesica D'cruz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views5 pages

DS - Unit1 Powerpoint-1

This document discusses abstract data types in programming languages. It explains that data types can be simple, like integers, or complex, like objects and lists. Complex data types are constructed from multiple simple types. The document also introduces the concepts of abstraction and procedural abstraction. Procedural abstraction allows using functions without knowing their implementation details.

Uploaded by

Jesica D'cruz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Abstract Data Types

Introduction
• Data items are represented within a computer as a sequence of binary digits.
• These sequences can appear very similar but have different meanings since computers can store
and manipulate different types of data.
• For example, the binary sequence 01001100110010110101110011011100 could be a string of
characters, an integer value, or a real value.
• To distinguish between the different types of data, the term type is often used to refer to a
collection of values and the term data type to refer to a given type along with a collection of
operations for manipulating values of the given type.
• Programming languages commonly provide data types as part of the language itself.
• These data types, known as primitives , come in two categories: simple and complex.
• The simple data types consist of values that are in the most basic form and cannot be
decomposed into smaller parts. Integer and real types, for example, consist of single numeric
values.
• The complex data types , on the other hand, are constructed of multiple components consisting
of simple types or other complex types.
• In Python, objects, strings, lists, and dictionaries, which can contain multiple values, are all
examples of complex types.
• The primitive types provided by a language may not be sufficient for solving large complex
problems. Thus, most languages allow for the construction of additional data types, known as
user-defined types since they are defined by the programmer and not the language.
• Some of these data types can themselves be very complex.
Abstractions
• To help manage complex problems and complex data types, computer scientists typically work
with abstractions.
• An abstraction is a mechanism for separating the properties of an object and restricting the focus
to those relevant in the current context.
• The user of the abstraction does not have to understand all of the details in order to utilize the
object, but only those relevant to the current task or problem.
• Two common types of abstractions encountered in computer science are procedural, or
functional, abstraction and data abstraction.
Procedural abstraction
• Procedural abstraction is the use of a function or method knowing what it does but ignoring how
it’s accomplished.
• Consider the mathematical square root function which you have probably used at some point.
You know the function will compute the square root of a given number, but do you know how the
square root is computed? Does it matter if you know how it is computed, or is simply knowing
how to correctly use the function suffcient?

You might also like