CS 2401 Quiz #2

Date: Wednesday, September 10, 2009.

1. Answer questions about the reading assignment:

1a. can a method call another method?

1b. can a method call itself?

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

2. Let temp[i][j] describe the temperature at moment i at location j. Write down a piece of code that computes the average temperature at a given moment of time. Trace this code on an example of 2 moments of time and 2 locations, with

in your example, trace how your code will find the average temperature at moment 1.