Computer Science 101 Program 1 Due Oct 13 at 11:59 pm 1. Write a complete program that will produce a .ppm image of one of the national flags identified below. Your program must obtain the width of the flag image in pixels from the command line and write the .ppm image to the standard output. The name of the country and the dimensions of the flag should be written to the standard error in the following format (the 600 is the width) Upper Volta 600 400 For this program the ONLY authorized source of assistance is Dr. Westall. ANY OTHER DISCUSSION of the program no matter how "high level" or "peripheral" (e.g. Have you started/finished it yet?) is STRICTLY FORBIDDEN. Any student who observes improper behavior is encouraged to report it to Dr. Westall. Reports that can be verified will be rewarded with a 20 point bonus on the assignment for the student doing the reporting and an F for the course for the student being reported!! Adhere to the following programming standards. Violations will lead to deductions. (1) no function should be longer than 30 lines code + whitespace. (2) the maximum nesting level in any function is ONE (3) code lines should not extend beyond column 72 (4) no more that one statement may be written on a single line (5) use reasonably descriptive names for variables and functions (6) package all functions into a single source code module named flag.c (7) your program should compile without any warnings with gcc -Wall (8) indenting should be consistent with logical nesting (9) diagnostic / debug prints should be disabled/deleted in your submission. For full credit your flag should be geometrically correct and use proper shades of each color. Your grade will be determined by the correctness of the program with respect to the above requirements and then MULTIPLIED by the degree of difficulty shown below: Country Degree of difficulty Libya 0.70 Poland 0.75 France, 0.80 Germany,Russia,Italy 0.80 Sweeden,Finland 0.85 Congo 0.90 (not the Democratic Republic of Congo) Czech Republic 0.92 Japan 0.92 Bahamas 0.95 Jamaica 1.00 Seychelles 1.00 United Kingdom 1.10 Rep of South Africa 1.10 For examples see: http://www.theodora.com/flags/ HOW TO SUBMIT YOUR CODE: NOTE: This procedure has NOTHING in common with "handin" nor "sendlab" Do NOT even TRY to think about how they fit into this procedure because THEY DON'T!! <<>> You must turn in 1 file: flag.c 1. From any departmental Solaris system ssh to workstation jmw 2. The submission directories lie in the directory /local/jmw2/101/mp1 which is available ONLY IF YOU HAVE LOGGED INTO WORKSTATION jmw. Each student has a subdirectory of /local/jmw2/101/mp1. The name of your subdirectory is your userid (in the example we will assume your id is wjsmith). 3. copy (via the cp command) required file to your subdirectory in /local/jmw2/101 /mp1 For example: cp /home/wjsmith/101/mp1/flag.c /local/jmw2/101/mp1/wjsmith Here you would obviously need to replace /home/wjsmith/101/mp1/flag.c with wherever you have your the program you are trying to submit. 4. Don't modify the permissions on your subdirectory. They are set so that ONLY you can access your directory. ---------------- After you think you have turned your programs in, its a good idea to cd /local/jmw2/101/mp1/wjsmith and make sure your files are there and they still compile and work correctly.