03-ADTs-Linked-Lists

03-ADTs-Linked-Lists - Abstract Data Types (ADTs) Levels of...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Abstract Data Types (ADTs)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Levels of Abstraction At the lowest level, all data in a computer is stored as a long sequence of 0-1 bits. Information is represented by terpreting articular bits in certain ways interpreting particular bits in certain ways. In the earliest days of programming, the programmer o ld decide that a partic lar set of bits o ld be set would decide that a particular set of bits would be set in a particular way to represent, e.g., a floating point number. S/he would then have to operate on the set of bits consistently with that interpretation. ooking at an early computer program would reveal Looking at an early computer program would reveal nothing but a bunch of operations on bits. It would be very difficult to discern that one set of operations adds o integers or that another increments a floating point two integers or that another increments a floating point number.
Background image of page 2
Levels of Abstraction (cont’d) he problems associated with the development of The problems associated with the development of large computer programs using primitive assembler languages stemmed from a lack of suitable levels of abstraction . or an early programmer, translating the statement For an early programmer, translating the statement multiply these two integers together ” into machine code required attention to all of the low level details relating how the integers are represented and the steps to how the integers are represented and the steps necessary to compute their product. A good programming language should attempt to minimize the difference between the level of abstraction at which the programmer thinks about a problem and pg p the level of abstraction at which the solution must be coded.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Levels of Abstraction (cont’d) he earliest programming languages revolutionized The earliest programming languages revolutionized programming by supporting higher levels of abstraction. Execution control mechanisms such as loops, if-then-else, subroutines, and other constructs were provided to make the logic of programs apparent. Prior to these constructs, program flow was controlled by a bunch of generic “goto” statements. There was no obvious way tell whether a branching statement was intended to to tell whether a branching statement was intended to represent an “if” statement or a call to a subroutine. Just as important was support for common Abstract Data Types (ADTs) to distinguish certain memory locations as storing particular kinds of data. Early ADTs included integers, reals, characters, and some languages even supported character strings and complex numbers.
Background image of page 4
Abstract Data Types (ADTs) hen a variable is declared to be of a certain type When a variable is declared to be of a certain type, the manner in which its value is represented and manipulated is defined by the language.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 118

03-ADTs-Linked-Lists - Abstract Data Types (ADTs) Levels of...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online