Problem 1
| Initialize ArrayList[] | 4 |
| For loop control | 6 |
| Adding element | 3 |
| Return | 2 |
Problem 2
| For loop control | 6 |
printf invocatoin | 3 |
| Format arguments | 3 |
| Format specification | 3 |
Problem 3
2 for each: 1.4 for value and 0.6 for type.
Problem 4
Creating array
| Declaring and creating array | 2 |
| for control | 4 |
| Setting element | 4 |
Counting aces
Initializing count| 1 |
| For loop control | 4 |
| Test with update | 5 |
Problem 5
Subproblem 5A
| Scanner open | | 4/tr>
| PrintWriter open | | 4/tr>
| Exception handler | | 5
| Message for each file | | 2
Subproblem 5B
| loop through words | | 5/tr>
| tests if token is integer | | 4/tr>
| prints token on line if integer | | 3/tr>
| skips token if not integer | | 3/tr>
Programs with while(scannerIn.hasNextInt()) as
outer loop [nonterminating loop] receive 4 of 12 points for parts one, two
and three and approrpriate points for printing integer