11-Abstract%20Data%20Types - 11 Abstract Data Types 11.1...

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

View Full Document Right Arrow Icon
ICS 313 - Fundamentals of Programming Languages 1 11. Abstract Data Types 11.1 The Concept of Abstraction The concept of abstraction is fundamental in programming Nearly all programming languages support process abstraction with subprograms Nearly all programming languages designed since 1980 have supported data abstraction with some kind of module
Image of page 1

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

View Full Document Right Arrow Icon
ICS 313 - Fundamentals of Programming Languages 2 11.2 Encapsulation Original motivation: ` Large programs have two special needs: ¾ Some means of organization, other than simply division into subprograms ¾ Some means of partial compilation (compilation units that are smaller than the whole program) Obvious solution: a grouping of subprograms that are logically related into a unit that can be separately compiled (compilation units) ` These are called encapsulations Examples of Encapsulation Mechanisms ` Nested subprograms in some ALGOL-like languages (e.g., Pascal) ` FORTRAN 77 and C - Files containing one or more subprograms can be independently compiled ` FORTRAN 90 and Ada - separately compilable modules 11.3 Introduction to Data Abstraction An abstract data type is a user-defined data type that satisfies the following two conditions: ` 1. The representation of and operations on objects of the type are defined in a single syntactic unit; also, other units can create objects of the type ` 2. The representation of objects of the type is hidden from the program units that use these objects, so the only operations possible are those provided in the type's definition.
Image of page 2
ICS 313 - Fundamentals of Programming Languages 3 11.3 Introduction to Data Abstraction (continued) Advantage of Restriction 1: ` Same as those for encapsulation: program organization, modifiability (everything associated with a data structure is together), and separate compilation
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
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