Assignment 6

CS 368, Fall 2009


Send e-mail questions to Mahesh, kvmakes@cs.wisc.edu
Due Wednesday November 18, by 12 noon.


Collaboration Policy

For this assignment, you may work in pairs (2 people). All students (whether working in a pair or not) must individually turn in the assignment by individually running the handin program. Therefore, 2 copies of the assignment will be turned in for those working as a pair. The grader will choose to grade only one copy of a pair's work, and assign the same score to both students.

If working in a pair, the names of BOTH students must appear at the top of the turned in assignment.


Program

The purpose of this assignment is to properly implement memory management in a C++ program.

Program Statement

Use your program from Assignment 4. Modify any and all files from Assignment 4 to properly implement memory management.

I strongly suggest that you use purify on your resulting program to verify that your program does not leak memory.

Include within comments at the top of file main.cpp:

  1. Your name (and partner's name, if working in a pair)!
  2. A list of the functions you needed to add to this program to properly do memory management. For each listed function, give a (brief) reason why it was needed.
  3. A second list of the functions you needed to modify. For each listed function, give a (brief) description of the modification.

Notes

  1. For this assignment, do all your work (especially compilation) on the instructional Unix machines.
  2. You should be able to use your Makefile from Assignment 5 to compile, and also to compile an executable instrumented for use with purify.

Grading

To receive the grade of Credit for this class, this program must receive a minimum score of 70/100. To achieve the 70% score, the program must

Handing In the Program

We are (again) using the lab-supported handin program, to turn in this program online.

You are turning in all 5 files that comprise the program:

Turn in your program by running the lab-supported handin program. Instead of following the lab's directions, use this exact command


  /s/handin/bin/handin -c cs368-1 -a a6 -d . 

while your current working directory is the one containing these files. This program copies the specifically named files to a directory accessible by the instructor and TA.