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

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

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

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

View Full Document Right 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 interpreting particular bits in certain ways 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. 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 two integers or that another increments a floating point two integers or that another increments a floating point number.
Image of page 2
Levels of Abstraction (cont’d) The 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 . 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 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 the level of abstraction at which the solution must be coded.
Image of page 3

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

View Full Document Right Arrow Icon
Levels of Abstraction (cont’d) The earliest programming languages revolutionized programming by supporting higher levels of abstraction. E ti t l h i h l if th l 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 to tell whether a branching statement was intended to represent an “if” statement or a call to a subroutine. J t i t t t f Ab t t D t 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.
Image of page 4
Abstract Data Types (ADTs) When 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. An Abstract Data Type is a data type defined by a set of operations that can be applied to it. For example, an “integer” ADT would be defined by operations such as addition, subtraction, multiplication, etc.; but the ADT does not specify implementation details A programming does not specify implementation details.
Image of page 5

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern