- Program Correctness (75%): The programs do everything that the
lab requires. If you have a question about how a program handles
a certain input, check the executables that have been provided.
- Works with blogdata.txt
- table formatting:
- (3 points) the column headers are correctly printed
- (3 points) the table has lines separating the entries and a frame around the
table
- (3 points) names are correctly printed and appear in the first column
- (3 points) date formatting: dates appear in the second column
- (7 points) months are correctly translated to the appropriate month label
(e.g., 2 gets translated to Feb).
- (3 points) years are prefixed with "20" (e.g., 2009)
- (3 points) the rest of the date is correct
- (3 points) times are correctly printed and appear in the third column
- Comments
- (5 points) Single-line comments work properly
- (5 points) Multi-line comments work properly
- Test Cases
- (3 points) single digit days are handled properly
- (3 points) single digit months are handled properly
- (7 points) Very large blog files: Works with blog files that contain a large number
of entries. If necessary, go into the student's file and change their default
array size to a small number, like 5. This is necessary because some
students may try to set the default array size to a very large number so that
their dynamic array resizing code is never tested.
- Comments
- (8 points) An extremely large multi-line comment (i.e., a content with a huge
number of lines).
- Error conditions
- (2 points) wrong number of command line arguments
- (2 points) invalid blog file name
- (2 points) inability to open the output file. To test this condition,
create a file and then deny yourself write permission for that
file. You can do so by first creating a file and then using chmod to
deny yourself write privileges. For example:
chmod u-w brad.html
The string "u-w" says to subtract write permission from the user, which
in this case is yourself. You can re-establish write privileges to the
file by using "chmod u+w brad.html". When you try to fopen this file
with the "w" flag, fopen will refuse, since you don't have write permission.
- (2 points) improper number of fields on the first line of a blog entry
- Boundary conditions
- (2 points) empty blog file: just output the headers for the table (see my
executable)
- (2 points) one or more empty lines at the start of the blog file
- (2 points) one or more empty lines at the end of the blog file
- (2 points) more than one empty line between two blog entries
- Commenting (15%): See the commenting
information
on the course's web page for advice on how to comment your programs,
- Program Style (10%): Are the programs well-organized and do they
solve the problem in the most straightforward, efficient way possible?