CS 2401 Quiz #3

Date: Tuesday, September 7, 2010.

1. Please answer the following questions about the reading assignment:

1a. Every recursive method must have at least one base case (True or False):

1b. We can solve the "Towers of Hanoi" problem using recursion (True or False):

1c. Infinite recursion is a useful problem solving technique (True or False):

2. Fill in the method below with code that multiples together the elements of the two-dimensional arrays a and b and returns the result in a new two-dimensional array c. For example, the first element in the first row of c should be the product of the first element in the first row of array a, and the first element in the first row of array b. Make sure to check for possible errors in the size of the input arrays.

public int[][] multiplyArrays(int[][] a, int[][] b) {

















}