2014 MCQ Test Corrections
Correcting wrong answers for the 2014 MCQ
- 18. Generate random index for ArrayList
- 26. Print odd integers in 1D array but not even
- 27. Mystery Method with Int Parameter
- 29. Print values divisible by 4 using for loop
- Reflection
18. Generate random index for ArrayList
b. (int) (Math.random() * myList.size())
This answer can't be A which is the one I chose because it ends with a -1. This doesn't work in this context as it starts with index 0 rather than 1 which I made the mistake of assuming. I will improve on this in the future because I now know that the array.size starts at index 0.
26. Print odd integers in 1D array but not even
a. for (int x : arr) if (x % 2 != 0) System.out.println(x);
Can't be C because you don't want to print the end result of the array index but instead print the number that is even. A is correct since it prints x instead of arr[x]. I will make sure to not have this problem arise in the future by paying more attention to the wording of the question.
27. Mystery Method with Int Parameter
d. 8
This is the correct answer over c because I simply did my arithmetic wrong. It's not really a matter of not understanding the material but rather my desire to finish the question in a timely manner. In order to prevent mistakes like this from happening on easy problems I need to take my time which was also my issue for the last question.
29. Print values divisible by 4 using for loop
e. for (int k = 4; k <= 100; k = k + 4) System.out.println(k);
This is the correct answer over B because I need to set the K value to 4 at the start of the for loop rather than 1 which was in the answer I chose. This is because rather than the starting lines of code it doesn't increment by 1 but rather 4. Therefore, k must start at 4. I can solve this issue in the future by again taking more time and thinking about the answer logically before choosing something. (I think there's a running theme with just small mistakes.)
Reflection
All in all I do think I did really well on this practice test since if it was the AP exam I would have gotten a five. However that doesn't mean I got a 100%. As we saw throughout this blog I made a lot of silly mistakes that could be realized and overwritten by just taking my time on the questions. Naturally I want to finish the test as soon as possible so making these little mistakes is easy. Going into the real AP MCQ and for really the future of my classes I think it's really important that I take more time on the questions are really understand what it's not only asking but also simple calculations that I could get wrong from rushing.