CS 2401 Quiz #2

Date: Tuesday, February 2, 2010.

1. Please answer questions about the reading assignment:

1a. can a method call itself?

1b. name one of the problems for which the book proposes a solution based on recursion

1c. can a method call another method?

2. Let snow[i][j] describe the amount of snow (in inches) on day i at location j. Write down a piece of code that computes the total amount of snow at a given location. Trace this code on an example of 2 days and 2 locations, with

in your example, trace how your code will find the total amount of snow at location 1.