CMPU-235: Software Development Methodology

Homework #2

Due: Tues., Sept. 22

Finish homework 1. This time, a working implementation will be the primary grading criteria. You may still assume the grid is rectangular.

In addition, you must provide the following operations:

  1. insert_row This function should take a single argument, an element (or pointer to an element ala iterators) of your grid, and should insert a new row above the row the element is in.
  2. append_row Like above, but should add the new row below the row of the element.
  3. insert_col This function should take a single argument, as above, but should insert a new column to the left of the column the argument is in.
  4. append_col Like insert_col, but should add the new column to the right of the column the element is in.
  5. = For element assignment, should take a string or integer on the right (depending on the grid type), and an element or pointer to an element on the left.

You should also begin to think about iteration, and how you will provide iteration over the elements of the grid. As part of your submission, enumerate the different kinds of iteration you think would be relevant for a grid.