Screenshot of My Test:

image

Journey, Learnings, and Discoveries

In the four months of my AP Computer Science A (AP CSA) journey, I’ve encountered both challenges and remarkable achievements. One standout achievement involved delving into hashmaps in Java and exploring the time complexities of common sorting algorithms during a mini project. Despite my primary task being the implementation of a betting system for our race car game, examining the existing code that dictated the cars’ paths and the time each car (representing a sorting algorithm) took to finish was fascinating. Additionally, creating a student lesson for the trimester exposed me to new jQuery concepts, making the lesson creation process more engaging.

As a team, we successfully developed a sorting visualization that combined visualization with education. Users could customize the number of elements for the sorting algorithms, place bets, and discover interesting facts about the algorithms, including Big O notation time complexities and sorting methodologies. Effective communication within our team, facilitated by a group chat, played a crucial role in our progress, helping us avoid issues like merge conflicts. However, we did face challenges, notably in deploying the backend component to AWS. An unexpected issue involving root user access disrupted many projects, leading us to showcase our backend database locally, adding a layer of complexity to demonstrating the sorting visualization.

Regarding the College Board quiz preparation, I took a practice MCQ test from Barron’s AP CSA 2024 book, emulating AP exam conditions, and scored 37/40. Notably, the three incorrect answers were related to recursion. To fortify my recursion problem-solving skills, I consulted a study guide to deepen my understanding.

Reflecting on the multiple-choice test, I attribute my success to a combination of prior trimester lessons and the continuous learning of Units 1-10 over four to five weeks. These lessons, designed to reinforce fundamental concepts, played a crucial role in my high score. I believe their impact will persist throughout the year, aiding me in future assessments.

In summary, my AP CSA experience has been a balance of enjoyment, learning, and occasional challenges. Despite the imperfections, I am confident that these experiences will be beneficial, especially as I approach the stage in my high school career where I plan to apply for internships and programs utilizing the skills and concepts acquired in this class.

Corrections

The rest of the blog will now be primarily focused on the multiple choice test that we were assigned to take this week.

image

As shown in the image above, I earned a score of 36/39 on this test, which is a very good score in my book. My score indicates that I have a very solid understanding of everything that we have studied in AP CSA so far (which is basically everything since we had all of those student lessons in the first trimester). While it is great that I was able to get this score on the test, it is important that I take the time to thoroughly review the concepts of the questions I got wrong, as that will ensure that I won’t make the same mistakes in the future, especially while I take the actual AP exam MCQ section in May.

Question 19 (incorrect)

The first question to look over is question 19, which is shown below:

image

I now understand that the answer to this question is I, II, and III because none of these provide output.

For I - It will never enter the while block if x < 0

For II - It will enter the while block one time. The remainder of 1 % 2 is not zero so it will not print the value of x.

For III - It will enter the block and loop 5 times. The x variable will be set to 1,3,5,7,9 for each pass of the loop. That is because x will be incremented by 2 with each pass (x=x+2 final line in the block). So, due to that, the x % 2 calculation is always an odd number, not divisible by 2 to a remainder will always be present. Due to this, no output will be produced by this condition either.

Question 25 (incorrect)

The next question to look over is question 25, which is shown below:

image

I understand that the correct answer is c: 10 because I now realize that the inner loop starts at y = x or the same index as the outer loop. The inner loop is one less pass for each increment of the outer loop. This is NOT 5x5=25!!!

For the 0 index, the count does +1 four times so the count goes one, two three, four.

For the 1 index, the count does +1 three times (1-3) so the count goes five, size, seven.

For the 2 index, the count does +1 twice (2-3) so the count goes eight, nine.

For the 3 index we only get one pass as the for loop is checking for < 4. The count does +1 once so the count goes to ten.

That’s the end of the loop. The println runs once and prints out the current value of the count variable which is 10.

Question 31 (incorrect)

The next question to look over is question 31, which is shown below:

image

I understand that the correct answer is “e” because the first “for” loop has an inner “for” loop and populates the entire 5x5 array with with “O”.

The code then has another “for” loop that loops through the numbers 0 to 4. The “for” loop ends when val = 5. The “if” condition checks for remainders = 1. The numbers 1 and 3 will produce a remainder of 1 in the range of 0 to 4.

The “while” statement starts with the row variable set to the number ‘1’ with the first pass. An “X” is set in [1][0]. the col variable is increased but the row variable is decreased. Given the while condition is “(col < 5 && row >= 0)” and col++ and row– there will be one additional pass through the while block code before it exits. An “X” is set in [0][1]. The row variable is now 0 so the while loop ends.

The “while” statement runs the second and last time with the row variable set to the number ‘3’. as the code is col++ and row– here’s what gets set:

X at row 3 col 0 X at row 2 col 1 X at row 1 col 2 X at row 0 col 3

The program ends at this point as only the numbers 1 and 3 will produce a remainder of 1 in the range of 0 to 4.

Reflection

In my overall reflection on Java concepts, I successfully applied my foundational knowledge to solve problems adeptly, demonstrating a strong grasp of basic Java principles. Despite encountering unfamiliar applications of certain Java methods, such as substring and set, I leveraged contextual understanding to explore and resolve problems effectively. Confronted with uncertainties regarding the order of operations and variable mutation through parameters, I relied on context and hindsight to acquire new insights and incorporate them into my approach. Notably, I exhibited a robust comprehension of class method behaviors, particularly in the realm of polymorphism. While I encountered minimal issues with Java syntax and expressions, I acknowledge the need for improvement in my testing environment. Adopting a more structured approach during multiple-choice question sessions, devoid of breaks and distractions, could enhance my practice and focus. Additionally, I recognize the importance of optimizing my efficiency when tackling problems involving nested loops. To mitigate unnecessary time expenditure, I aim to read all possible answers and question components thoroughly, minimizing potential confusion. Moving forward, I commit to dedicating specific attention to comprehending and reinforcing my proficiency in applying knowledge related to iteration and operations, such as integer division, to solidify my muscle memory for future endeavors.