last modified 2/28/01

Modular Programming

Recommended Reading:

Sedgewick pages 166-171

1. Interface

- defines data structure

- declares functions to be used to manipulate data structure

2. Implementation

- actual code for the functions declared in interface

- you may have more than one implementation for the same interface

3. Client

- a program that uses functions declared in interface (without 'knowledge' of how they are implemented or of underlying data structure)

- multiple, separate clients can use the same interface

 


Questions from Students

  1. What is a "debug" client?
     
     
  2. What are the benefits of "changing implementation without having to change programs"?
     
     

main page