On this practice exam, I scored 54/66.

Q13

  • For this question, I misevaluated and thought that x!=y would evaluate to false and (x||y) && x would evalute to false. However, the second expression is true leading to inequivalent answers

Q19

  • On this problem, I evaluated the first part of the question right butI thought the ! would switch the inequality but didn't factor in the ! that wrapped around the whole expression

Q51

  • I think this was just a silly mistake beacause redoing the problem after, I got the correct answer. I may hav read the modified method wrong, resulting in my wrong answer

Q53

  • For this question, I thought that he while loop should be x < n-1 but didn't take into account that the "total" should be initialized to 1 so that the two methods work

Q54

  • I got this problem wrong because I thought the if statement would produce "abcde" instead of the backwards "edcba" to produce true beecause of the inital if (str.lenght() <= 1)

Q56

  • For this one, I thought there didn't need to be an else statment because the k++ was out of the while loop but loooking at the order of the paranthesis now, it is inside and thus needs a else before k++

Q60

  • Fo this one, I guessed because I couldn't figure out how shuffle methods worked. Now looking at the correct answer and the explanation for it, I see that it is because the last element returned in the array may not have the correct value and not that there would be an ArrayIndexOutOfBoundsException

Q61

  • This is another one that I didn't know how to do and guessed. With the explanation, I see that there needs to be a reference object to impliment Stdent interface as a part of the Athelete class

Q63

  • With this one, the answer I chose would have resulted in an ArrayIndexOutOfBoundsException because it would try to access an element outside arr1. Option C is right because the modifying statement is not needed because arr1 shouldn't be changed

Overall Comments

  • I am pretty proud of this score
  • In the future, I will focus on being able to complete the test within the time limit since I took over 4 hours on this test over a couple of days.
  • I got a lot more wrong at the end because I was rushing and wanted to get the test done
  • Thought this test was harder than the other practice MCQ we did
  • I missed mostly equivalent expression problems so I need to work on them