CS 12 -- Lab 7

We spent the lab hour simply getting familiar with C++ syntax, compilation, and oddities. What remains for this lab is the completion of the IntArray class.


The IntArray class

From my public directory, you should already have copied the following file:

~sfkaplan/public/cs12/useIntArray.cc

This simple program relies on an IntArray class to exist that provides array-like behavior, but with automatic bounds-checking.

Your assignment is to write the IntArray.hh and IntArray.cc files needed to define the IntArray class. It must contain a constructor, an assign() method, a get() method, and a length() method such that the code in useIntArray.cc will compile and run correctly.


What you must submit

Once you have written and tested the various classes, you must use the cs12-submit command to submit them. Submit this assignment as lab-7 when you use the cs12-submit command.


This assignment is due on Sunday, November 9th, at 11:59 pm.

Scott F. Kaplan
Last modified: Sun Nov 5 22:48:52 EST 2000