CIS105 Fall 2003 Project 3

Grading is according to coversheet on p. 114 of lab manual.

IMPORTANT

Name your .c files according to the following scheme: torthare_userid.c or myplot_userid.
For example, my userid is pconrad, so my files would be torthare_pconrad.c or myplot_userid.c

Point values will be awarded according to the Project Coversheet on p. 114 of your lab manual.

There will be a 10 point deduction if you do not hand in both a .c file (with the proper naming convention) and a .txt (script) file. Name your .txt file proj3.txt. The script file should contain the usual stuff.

There are two choices for project 3.

  1. Do the tortoise and the hare problem from page 305 of the textbook (problem 7.17). There is no "A" grade option for this choice.
    OR
  2. Extend your project 2 to be a "myplot" program that will generate banners with any uppercase letter of the alphabet, the exclamation point, and the question mark. The program should take its input from the command line, e.g.:
       
    myplot HAPPY BIRTHDAY\!
    
    will generate a myplot.dat and myplot.gnuplot file that will generate myplot.png, a file containing HAPPY BIRTHDAY! (in the side by side style).

    If there are any characters in the input other than UPPERCASE letters, "?" or "!", you have one of three choices:

    To get the A grade, you should also allow for the case where there are more than 3 or more command line parameters, and in this case, print the words down the page in the "on top of each other" style.

Note: to test your program with the "?", you will need to put a backslash on the command line. We can use the "banner" program (a unix utility) to illustarte. Try typing this at the Unix command prompt:

banner GOT MILK?
You'll probably get an error message "no match". Then try:
banner GOT MILK\?

You'll have to do the same thing when you test your program with "?". Note that there is nothing special you have to do in your program to make this work; this is something the shell does for you. The "\" will be gone by the time you read the command line parameter "MILK?" out of argv[2].


Phillip T Conrad
Last modified: Tue Nov 25 09:03:16 EST 2003