1. 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.

    1. (50 points) flips a pgm file vertically
    2. error conditions: You should given an appropriate error message and exit the program if any of these errors are detected. When appropriate, give the line number in the input file on which the error occurred.
      1. (4 points) improper number of command line arguments
      2. (4 points) failure to open the input file
      3. (4 points)failure to open the output file
      4. (4 points) invalid input on the first, second, or third line of the pgm file
      5. (3 points) pixel values that are outside the range 0-255
      6. (3 points) insufficient input (i.e., there are fewer than row*column pixels in the input). Do not worry about the opposite case in which there are too many pixel values. If there are too many pixel values, simply ignore them.y
      7. (3 points): Error message for an empty file

    Commenting (15%): See the commenting information on the course's web page for advice on how to comment your programs,

  2. Program Style (10%): Are the programs well-organized and do they solve the problem in the most straightforward, efficient way possible?