CHAPTER 5: PACKAGING DATA ABSTRACTIONS

Introduces the concept of modules and file modularization to structure programs

With this type of program structure data abstractions are placed in files separate from the program file, and this hides the details of the data abstraction from the programmer using them easing the programming task

increases efficiency as it enables the data abstractions to be compiled separately and stored in object code (separate compilation is possible)

To illustrate how programs are structured using modules and file modularization four examples, from previous chapters, are presented in detail

primes

stablemarriages

creation and printing of a list

nonrecursive Towers of Hanoi

5.1: Data Abstraction Revisited

5.2: The Prime Example

5.3: Stable Marriages

5.4 : A List Example

5.5: A Stack Example

5.6: Summary

Exercises

Suggested Assignments