CIS 122: Assignment #2

Due at the start of class,
Tuesday, July 27 2004


Reading:

Ch. 3.8, 4.1-6, 6.1-4, 7.1-5

This will catch us up to the calendar readings through 07/22.

Programming Problems:

Do the following problems from your text:

  1. Chapter 4, either #25 or #29 (your choice). Do both for extra credit.
  2. Chapter 6, #14(a)
  3. Chapter 7, #6(a)

For additional extra credit, do also Problem #9, Chapter 7.

NB:I realize that we have not yet covered the material on loops or string data in class, so I'll ask you to trust that I'm not out to kill anyone here :-) These problems were chosen because I believe they are among those that can be completed simply by doing the reading.

Standards:

As with all programming projects, your work will be judged primarily on its correctness. In particular, the programs must compile. Programs that do not will receive a severe grade penalty. Over and above this is the requirement of correct behavior: the cubic volume reported must be correct.

Third, there is presentation: prompts should be formatted neatly (exactly matching the example here is good).

Finally, your program will be judged on elegance and adherence to the principles of good programming style. Elegance means that there should be nothing there that isn't necessary for the computation: all variables should have a use, as should all assignments to those variables. Style refers to the proper use of indentation, information variable names, documentation with comments, and other matters of readability. For a discussion on the elements of programming style, see pages 24-27 of your text and/or The Elements of C++ Style (available on reserve in th Science Library).

Turn in:


John H. E. Fiskio-Lasseter
Last modified: Thu Jul 22 16:20:24 PDT 2004