Problem 1 | |
Declare String[] to return | 2 |
Initialize String[] (new String[2013]) | 2 |
For loop header (for int … | 6 |
Setting array element | 3 |
Return | 2 |
15 | |
Problem 2 (each of 3 parts) | |
Appropriate instance or class | 2 |
Method name | 1 |
Argument 1 | 1 |
Argument 2 | 1 |
5 | |
Problem 3 (each of 10 parts) | |
Value | 1.4 |
Type | 0.6 |
2.0 | |
Problem 3 (each of 8 parts) | |
Value | 1.7 |
Type | 0.8 |
2.5 | |
Problem 4 (page 2) | |
Test for base case (n==0) | 4 |
Return for base case (return 0) | 4 |
else for non-zero case | 2 |
Recursive call (square(n-1)) | 4 |
Add for recursive return (+ 2*n + 1) | 4 |
Return for non-zero case | 2 |
20 | |
Problem 4A, 4B & 4C(page 3) | |
One point per missed word/token | |
Problem 4d (page 3) | |
Correct instance | 2 |
Correct method | 2 |
Correct argument | 1 |
5 | |
Storing into another object (typically string) | -2 |