NOTE: You will probably be running out of disk space about now, and you'll need to free some space in order to compile program3.cpp. Using FileManager, go to drive u: and delete your old .exe and .obj files (files like program1.exe, program0.obj, etc.).

Also, there are sample programs for each of the assignments below located in the r:\handin\rmanning\examples directory. To run the sample tabloid headline program, for instance, double-click on the file tabloid.exe from FileManager.


SUGGESTION: Program 3 deals with functions. The best way to learn about functions is to sit down at the computer and try to write some. Write simple, little functions just to get a feel for their syntax and how they work. Write a "Plus" function like in class, and invoke your Plus function from main(). Print on the screen the number that Plus sends back (e.g. cout << Plus(3,2); ), and make sure it's correct. Using Plus as a model, write a function that does multiplication or one that does division. Write other little functions, like Floor, Round, MyCos, Clamp, or Power given in class. Write a function that simulates rolling a die. Write functions that just print something on the screen or just get some input from the user. Write functions that call each other, and make sure the program executes in the order you expect it to. Write anything!

And when you feel comfortable with functions, do the assignment.


For assignment #3, choose one of the following. You may want to look over all of them before choosing. (If you don't like choosing, you must pick the first assignment!)

1. The "tabloid headline generator" program. In this assignment, you will write a program that produces random tabloid-like headlines reminiscent of "The Star" or "The National Enquirer." A basic outline for the program is provided and you only need to fill in the "guts" of some functions.

2. The "image processing" program. Write several image processing routines then create a "slideshow" demonstrating all your effects. Not as hard as it may sound!

3. The "convert numbers to English" program. The task is simple to describe: write a program that takes in a number and then prints the number out in words (like on a check). For example, 634 is written "six hundred and thirty-four." I don't provide as many hints for this assignment, and you'll need to be a little clever with how you use functions.