Middle exam rubric

Problem 1

Initialize String[]2
For loop3
Return2

Problem 2 — 2 points each part

Appropriate instance or class0.8
Method name0.4
Argument 10.4
Argument 20.4

Problem 3 — 1 point each part

Value0.7
Type0.3

Problem 3

There are eleven tokens. 0.4 pts per token, except the three tokens of (int) are 0.8 points total.

There are six subexpressions. 0.5 pts deducted for each missed or mislabeled expression.

Problem 4

1.4 points for each of the first five and 3 points for each of the last three.

Problem 5

if3
recursive return4
else1
base return2

Problem 6

header4
initialize sum2
for loop control3
for loop body2
return1

Problem 7

declaration of pts4
outer for loop control2
inner for loop control2
element creation4

Problem 8

try-catch4
creation of sockAddr4
printing hostname2
printing error message2