January 16, 2007
"Reading maketh a full man; conference a ready man; and writing an exact man." Bacon, Essays, Of Studies
The author states:
"Computer programs are practical magic. To craft a program is to construct a complex and beautiful incantation; to run a program is to discover with delight that the magic actually works!"
Here are some implementation questions or questions about how the magic works:
Due January 23, 2007. Write a program in the language of your choice that takes its input from stdin and puts its output to stdout.
The program expects the input to be text and it removes all "blank lines" (lines that only contain a newline character) from the input. The output, then, is a copy of the input except that the output contains no "blank lines" as defined above.
Include appropriate documentation as specified in the department's documentation guidelines.
Test the program adequately using the source file as input, a file that starts with a blank line followed by a few lines that aren't blank and that ends with a blank line, a file containing only blank lines, a file with no blank lines, and the executable version of the file. If the name of the executable file is noBlank and xyz is the name of a file that will be modified by the program, then use noBlank < xyz >xyz.test.
Using one email message send me a copy of the source, a script of your tests, and copies of the output files.
