UMBC CS 201, Fall 06
UMBC CMSC 201
Fall '06

CSEE | 201 | 201 F'06 | lectures | news | help

Program Libraries

  • The three most important concepts in Computer science: Modularity, modularity, modularity.
  • Functions provide a way to divide your program up into managable chunks.
  • Libraries group functions into larger modules. Why is it usually a good idea to break a large program into smaller pieces? A more general question is how to make functions that you have written available to other programmers. Typically we provide the compiled version of our functions and an interface.


    Interfaces

  • An interface is a file that contains information that a user need to know in order to use the functions in the library. It must be a very well commented file.

  • The interface of a function is simple: If the code truly represents a function, then this is all you need to know to use it.

    Think of a library as a collection of functions. Some of the functions are written to be used by others and some are internal ones which have been written to support the others.

    We say that the functions which are intended to be used by others are exported by the library.

    What does the user of a library have to know?

    Hmmm .... sounds like some well commented function prototypes ...


    CSEE | 201 | 201 F'06 | lectures | news | help

    Tuesday, 26-Sep-2006 07:32:25 EDT