( --> )
Incremental Programming
Definition
Incremental programming is a programming methodology
wherein one develops a program by writing a sequence
of programs with the following properties.
- The first program in the sequence performs some
essentially trivial task, but one which is fundamental
to completion of the ultimate task.
- The last program in the sequence performs the
task of ultimate interest.
- Each successor program in the sequence (each
program other than the first) performs a task only
marginally more elaborate than its predecessor.
Example
Suppose you are asked to determine the difference between
the extreme values of a triple of integers.
- Write a program to read three integers and write
them out.
- Same as 1, but also determine and print the
largest of the three.
- Same as 2, but also determine and print the
smallest of the three.
- Same as 3, but also determine and print the
difference between the largest and the smallest.
- Same as 4, but kill all output statements other
than the final one.