ABSTRACT

This problem asks you to write a program that reads integers from a file, sorts the numbers, and writes the sorted numbers out to another file.

The previous chapter explained why testing does not guarantee that a program is correct: There are too many possible cases. Nevertheless, testing still plays a central role in software development, because testing helps detect problems. Before writing a program, or even a single function, software developers should always think about how to test it. Often this involves creating test inputs by hand, based on an understanding of where the weakness in the function or program may be. This can be a lot of work, however, and it is often useful to write small programs to generate test case input.