CS 2401 Quiz #2

Date: Tuesday, February 3, 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 grade[i][j] describe the grade of student i on assignment j. Write down a piece of code that computes the average grade on a given assignment. Trace this code on an example of 2 students and 2 assignments, with grades 90 and 100 for the first assignment, and 80 and 70 for the second assignment; in your example, trace your code will find the average grade on the second assignment.