CONTROL

    One of the Fundamental Aspects of Algorithms is CONTROL:

    Sequential: steps are linearly ordered
    Example: sift flour; add eggs; add butter; stir; ...

    Iterative: steps are done repetitively (for, while, until)
    Examples: Stir batter 50 strokes, ...
      Until batter is smooth, ...
      While batter is still lumpy, ...


    Conditional: each step is done only when some
    condition is true or false
    Examples: (pasta) if pot boils over - then turn down heat, ...
      if mixture is too stiff - then add water, ...

[PREV][TOC][NEXT]


CS1104 Main Page
Last Updated 01/05/2000
© L.Heath, 2000