Skip to the content.

AP CSA MC process and learnings

My learnings from the test and

Before the practice

  • I have practiced some CSA with codingbat java
  • I know things like strings and substrings, but I do not have an understanding of functions and the classes.
  • I need practice with all parts of CSA and learning about how each part works together.
  • I am working with Aranya who knows more about Java and is helping me learn. # During the practice

    Things to Keep in Mind

  • Dividing by int will only return an int, operations with only int will return an int.
  • Arraylist is a dynamic Array where it will expand as I input more values.
  • Demorgan's Law states that !(A&B) = !A || !B, or !(A||B) = !A && !B
  • 2D Arrays create a row and column, so you can declare how many rows and columns that you want.
  • Remeber that Iteration is happening until the conditions are not true. # After the practice

    Reviewing my practice:


    Image 1
    The most questions missed were in topic 2C.
    Image 2
    This topic is under section 2, which is the Code Logic section. The requirement is as follows:
    Image 3
    This tells me that I need to review coding logic, especially following written code. Image 4 I have a decent understanding of arrays and booleans. The topic that I need the most practice with is recursion, but I will be getting to all the topics. # Corrections: ### 1 Image 5 this is incorrect, as it would have been returned if it was iterated one time fewer. Therefore, the correct answer is 7. ### 8 Image 6 My answer was "II only" but I should have picked "I and II only" because option 1 would still create a new object, just without parameters. ### 10,11 Image 7 10. I selected I only, but this is incorrect as it will not return an error if the element was target. Option II is correct because it will always be out of bounds. 11. the correct answer for the missing code is if (last< data.length) return -1; because this will prevent the ArrayIndexOutOfBoundsException. ### 12 Image 8 ompute is incorrect because it would be returned if k was incremented by 1. Since k is incremented by 2 and starts at 1, optr will be returned. ### 15 Image 9 The correct answer was I only because the second segment returns an error. ### 22 Image 10 I answered that Line 6 will not compile because the statement is ambiguous. The compiler cannot determine which length method should be called. The correct answer is Line 4 will not compile because variables of type Book may only call methods in the Book class. ### 23 Image 11 D is incorrect, it would be correct if k>1. B is correct because baboon is indexed first and is moved to 1. cat stays. Bass is moved to index 3. Zebra doesn't change. baboon is moved to index 5. ### 24 Image 12 I said that 3 is printed. The actual value that would be printed is 7. ### 25 Image 13 I answered that all three options were correct. This was false because a box with a smaller volume still could have a larger surface area than the other box. This was an issue where I didn't fully understand or comprehend the question. The answer should have been I and II which both return the depth of the box. ### 26 Image 14 The option B which I selected increments and checks for odd, but will not print odd values. A will return the correct values, as it will print the odd values. ### 27 Image 15 I said that 1 would be the result. the correct answer was 8 because it repeats this process, decreasing n by 1 each time, until n is 2. After four loops, x becomes 8, and the method returns 8. ### 28 Image 16 I said that x willl sometimes be 1 at //Point B. the correct answer will be n will always be greater than 2 at // Point B. ### 29 Image 17 The correct answer is E because it will return multiples of 4, instead of the numbers 1-25 ### 30 Image 18 The correct answer is C because the second part only goes to an index of 7. ### 31 Image 19 I said that nothing would be printed. The correct answer is 5 7 8 11 19. ### 36 Image 20 My answer was incorrect because 12 would result in the same output as 8. The correct answer is 8, 9, and 11 because 8 is even and y = 3, 9 is odd and not greater than 9 so y = 1, 11 is odd and greater than 9 so y = 5 ### 37 Image 21 My answer is incorrect because choice 3 also works, since once the integer is equal to 7, the loop will end as the conditions are no longer true. ### 39 Image 22 16 is correct, I will be able to explain this once I learn about recursion ### 40 Image 23 It indexes the substring from 0-4 in that order and repeats this process.

    Things to Focus, Next Steps

  • Recursion – understand the concepts.
  • Iteration – remember to follow the code.
  • In general, learn more about Java and review concepts in order to have a better and faster understanding of code and what the questions are asking for.
  • There is a lot of improvement still needed. One thing I will do is review one problem per day and review the concepts.

  • Image
    I have improved since the last MCQ practice. However, this MC took me very long to complete. I must work on the timing and practice more often. ### 3 ###