CS 2401 Quiz #2

Date: Tuesday, September 9, 2009.

1. Please 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 location. 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 location 1.