Open Pitsco opened 4 months ago
Overall, these blogs were done well. You provide lots of context to the question, pretty much porting over the CollegeBoard question, explanations and all. The runtime code was there and functioning as well, outputs being nicely organized.
FRQ | Grade | Explanation |
---|---|---|
1 | 0.92/0.9 | Code functions as required, reflections are thoughtful and sufficiently in depth. Something I really appreciated was how you integrated code cells into your reflection. |
2 | 0.97/0.9 | Code functions as required, reflections were not as in depth, but they were sufficient. Explaining choice of StringBuilder was very good. and the user input with scanner was very clever and well implemented. Extra functionality was a nice touch. I learned what StringBuilder is and how I can use it to analyze strings for various purposes. I will definitely be using this in the future. |
3 | 0.91/0.9 | Everything was done as required. Code was functional, and reflections were pretty good. Not much to say here. |
4 | 0.92/0.9 | Code was functional, and reflection was good. I liked how you provided an example of how an interface would be implemented. |
This issue was pretty well constructed. Sufficient evidence of implementation to project concept given. Explanations helped me connect the dots between FRQ concepts and project implementation. Reflections were ok as well, nothing super deep/insightful, but it serves as a good reflection on work and ability. Things you could've improved on include:
Question 1, Arraylist (Arrays/2D Arrays):
This question primarily focused on arraylists with a side addition of 1D arrays and 2D arrays. Knowing how to iterate through each array was key for this question because we needed to know how to add each value to find the sum of the rows of the 1D or 2D array.
The code above is a sample usage of arraylists in our code from a file called
PlayerGeneralController.java
which generates all players ever in the NBA and their basic stats (name, height, most current team, etc.).The player data is stored in a List named playersData. This list is created using the ArrayList implementation, but the type of the variable is the more general List:
Later in the code, player data is fetched from the API, and the playersData list is instantiated as an ArrayList:
In this line, playerDataArray (which is a JSONArray) is converted to an ArrayList and assigned to the playersData variable.
The code uses the List interface and the ArrayList implementation, but the specific variable type is List. This connects back to them problem in question 1 because I also instantiated a list based on the sum of the rows:
Instead of creating a arraylist of player data, I created a new list of the sums of each row.
More about the progress with the code above:
This file was left unfinished by me. I archived it because it wasn't as important as an individual stats page. I would like to possibly touch on in third trimester for all 2023-2024 players instead of ALL NBA players because looking at ALL players would be pointless for a fantasy draft (that regards to the most current season).
Question 2, Classes:
This question focused mainly on classes, constructors, instance variables, and methods. Understanding how to write and set them is crucial to any type of java code as Java is consisted of those 4 factors.
The code above is found in our PlayerSearchName.java file, which is solely used to find a player's name based off their name. It has the class name of
PlayerSearchName
(respective to the java file's name) with an instance variable ofAPI_URL
that is set as a string. The method isgetPlayerByName
is used to make a REST template that can pull the individual data into a String type. Although it is not as simplistic as the problem from College Board's 2015 problem 2, it definitely shows the required understanding of the linkage between classes, constructors, methods, and instance variables.More about the progress with the code above:
Originally, I would always search by player id in PlayerSpecificController.java through:
But searching by id instead of name is way more difficult for the user. I've fixed that with PlayerSearchName.java using:
Although this seems very minor, I think finally being able to understand what type of data that was pulled from the api (arrays) and how to search that data based on different functions has been a big improvement for me. In AP CSP, I didn't understand what pulling API data even meant. Now that I'm in CSA, pulling API data through backend has been easier to do than ever.
Question 3, 2D Arrays:
2D Arrays are very useful when storing data proficiently. In our code, however, we don't have much 2D arrays scattered around. Majority of our data stored is through arrays or lists.
If I were to create a 2D array to store the stats, I could create a 2D array to store player stats where each row represents a player, and each column represents a specific stat. Let's assume you have player stats like points, rebounds, assists, and so on. Here's an example of how you might create a 2D array for this purpose"
Rows: Each row in the 2D array represents a player. For example, Player 1 might be in the first row, Player 2 in the second row, and so on.
Columns: Each column in the 2D array represents a specific stat for all players. For example, the first column might represent points, the second column rebounds, the third column assists, and so forth.
So, if you have an array of player names (Player1, Player2, Player3), you can create a 2D array where the element at position [i][j] represents the stat j for player i. This way, you can organize and store the player stats in a structured manner, making it easy to retrieve and manipulate individual player stats.
It comes back to the CB 2015 Problem 3 because the two classes, SparseArrayEntry and SparseArray, are for representing and efficiently manipulating sparse arrays. A sparse array is a two-dimensional array where most elements are zero, and non-zero values are stored along with their row and column indices. The SparseArray class includes methods to get the value at a specific position (getValueAt) and to remove a column efficiently (removeColumn).
Question 4, Method and Control Structures:
Although interfaces are not used anymore in the exam, learning it is still better than not learning it. I remember a question that was with interface in the CB 2014 MC.
It had a similar format as the
interface
both served a relatively same purpose. However, instead of defining the getMileage() method as a double, this CB 2015 FRQ wanted us to return a Boolean value if this interface was implemented into a class.The
PersonJpaRepository
interface demonstrates the practice of Spring Data JPA for handling database operations. Extending the basicJpaRepository
provides handy CRUD functionalities, making data management more straightforward. The interface offers flexibility through custom queries using the @Query annotation, allowing for more complex database interactions.This is similar to CB 2015 Problem 4, with the
NumberGroup
interface and its implementation in theMultipleGroups
class. It provides a straightforward way to manage groups of numbers.MultipleGroups
efficiently handles a list ofNumberGroup
instances, simplifying the process of checking for the presence of numbers within these groups.Mr. Mort's Reference
Overall Reflection:
Understanding of Arraylists: I feel confident in my understanding of arraylists and their usage in Java. The code snippets provided showcase my ability to work with arraylists, iterate through them, and manipulate data efficiently.
Class Implementation: The second question focused on classes, constructors, instance variables, and methods. I have a solid grasp of how to structure classes in Java, set instance variables, create constructors, and implement methods. The example code for player name search demonstrates this understanding.
Improvement in API Data Handling: Reflecting on my progress from AP CSP to CSA, handling API data has become much clearer. The transition from searching by player ID to searching by name, as shown in the PlayerSearchName.java file, is a practical improvement that enhances user experience.
Sparse Arrays and 2D Arrays: While sparse arrays were initially challenging, especially in the context of the CB 2015 Problem 3, I made an effort to understand the concept by relating it to a grid with mostly zero values. My experience with 2D arrays has improved, and I can now create and manipulate them effectively.
Interface Understanding: The use of interfaces in Question 4 required some research and learning. I now understand that interfaces provide a contract for classes to implement, and my implementation of the PersonRoleJpaRepository interface in Spring Data JPA showcases this knowledge.
Overall Growth: Comparing my current abilities with past multiple-choice challenges, I can see significant growth. I now handle more complex topics like sparse arrays, interfaces, and Spring Data JPA with greater ease, indicating a solid progression in my Java programming skills.