In case the images below aren’t working, here is a link to an issue with them:

Corrections

Score: 28/39 image-13.png

Problem 3 image.png Notes: I think I got this wrong because I didn’t fully understand inheritance. If both the parent and child classes have a method of the same name, an object will execute the method of the class it is instantiated as.

Problem 9 image-2.png Notes: I didn’t understand that Math.random() produces a random double between 0 and 1 not including 1. Therefore, when you make this double and int, you only get integer values from 0-5, which is not how a six-sided die works. Therefore, you’d need to add two (int)Math.random()*6 together, and then add 2 two it to get a full range of values from 2-12. This would accurately simulate rolling 2 six-sided dices.

Problem 12 image-3.png Notes: I have forgotten about De Morgan’s Law. I’ll put a reminder in here for me: image-12.png. The important things to remember are that not(A or B) evaluates to not A, not B and not(A or B) evaluates to not A and not B, and not(A and B) does not equal not A and not B.

Problem 19 image-4.png Notes: Apparently I did not read the question thoroughly enough. I believe I misread condition 3, where x<10, as x>10. This led me to believe that the code would print something if the while loop had the condition x>10.

Problem 24 image-5.png Notes: I misunderstood how overloading works. A class can have multiple methods with the same names if they take a different number of inputs (like one(int first, int second, and int third)), a different variable type (one(String first)), or they take the same types in a different order (one(String first, int second)).

Problem 26 image-6.png Notes: When I read the code in the question, I did not pay attention to //int [] arr = new int[5] or the //word = word.substring(0,5) in the changeIt function. Without these lines, my answer to the question would be right because the variables in the changeIt function would be referencing and mutating the original values. However, because of these lines of code, the values passed into the changeIt function are referring to new variables, meaning any changes do not affect the original variables.

Problem 28 image-7.png Notes: When I tried to calculate the number of times the /* Compare values / line evaluates, I accidentally added 6+5+4+3+2+1, instead of adding 5+4+3+2+1. This gave me the incorrect answer of 21, rather than the correct answer of 15. When I tried to calculate the number of times the / Assign to temp */ line evaluates, I accidentally added a 1 to the correct answer, making it 6 rather than 5. I think this is because I missed the j<data.length()-1 This led to me making this mistake.

Problem 30 image-8.png Notes: I made a silly mistake on this question. In Choice I, I should have realized that because all three statements are if statements, they will evaluate one after the other, meaning that totalCost would always be numBoxes * 5.00. Therefore, Choice I is not a valid choice to make the code work.

Problem 33 image-9.png Notes: This is another silly mistake. I’m not really sure why I chose this answer, but I think it was because I thought that the code wouldn’t work without the Integer.MIN-VALUE for some reason.

Problem 37 image-10.png Notes: I think I guessed on this problem, which is why I got it wrong.

Problem 39 image-11.png Notes: I got this question wrong because I didn’t understand how the .set() method worked. I thought it would print the the value that replaced the value in the list. Instead, it prints the original value of the item in the list.

Journey

The process of taking this MCQ was informative. I took me longer than I expected. I tried to make sure that I was thorough in selecting my answers, so I would maximize my score. Some questions really tricked me, like question 3, so they took longer. Others were easier, and I was easily able to answer them correctly. The test gave me a good gauge on where I am in terms of being ready for the AP exam in the spring. I think that I’m better than I was last tri, but I still need to do some work before I’m ready for the exam.

Learnings

By doing this MC, I learnt a lot. Most noticeably, I think I learned more about the specifics of several methods within Java. For example, I barely knew what the .set() method did before I took the MC. But now, I fully know what it does. More importantly, taking the MC taught me how to look at and analyze Java code. From now, I’ll be better able to look at my Java code when it is giving me problems and debug it. This will help me in future projects, in CSA and beyond, whenever I run into bugs in my code.

Discovery

After having taken the MC, there are several topics that I have identified as ones that I need to work on. For example, one is inheritance. Although I thought I knew it pretty well, I think I will need to review it once again. I also need to review other things like arrays and loops, which were the topics of some questions that I missed. Most importantly, I think that I need to learning boolean algebra and operators. I feel like this was the topic that I knew the least about. I think this is because I had little knowledge of it before CSA, whereas I at least knew some Java before the start of the school year. To learn more about these topics, I think that I might incorporate them in a future project, to further learn how they work. For boolean algebra, I might need to do some separate studying.