vivianknee / vivianblog

MIT License
1 stars 0 forks source link

2015 FRQ Associations #6

Open vivianknee opened 7 months ago

vivianknee commented 7 months ago

FRQ 1

The major theme of this frq is the breaking apart of 1D and 2D arrays, as well as methods that return 1D arrays out of 2D arrays. This frq also checks to see if they are "diverse" or if there are similar elements or trends between the rows of a 2D array. We often worked with arrays during our PBL, mainly involving API's. The data for my project's leaderboard API and login API all stored data on the backend. In the frontend, it appears as an array of data similar to the 1D array.

Screenshot 2024-02-26 at 9 13 44 AM

In our code we did not explicitly use 1D or 2D arrays; however, we did use Lists and Maps in the context of Java Streams that conceptually reflect principles similar to working with 1D arrays. The List sessionList serves as a collection, analogous to a 1D array, containing game session data. The iteration through the sessionsByUId Map involves traversing the keys (user IDs) and their associated values (lists of game sessions), similar to iterating through a 1D array and accessing its elements. We also did use a nested for loop for each user iterates through a list of game sessions (gList) and used a conditional if statement within this loop to check for the minimum session time.

FRQ 2

FRQ 2 is related to comparison between characters and strings. Being able to build strings is very useful for concatenating things. Being able to also use the stringbuilder class is very important, because there are times where you want to build strings, such as real-time inputs (again, with searches for queries) or anything else. As a result, this FRQ relates probably the most to our PBL. We have used string building in our project in order to create our Cyber news feature which displays data on specific news based on a search with a key word.

FRQ 3

FRQ is also related to arrays, but primarily sparse arrays. A sparse array is a data structure used to represent an array in which most of the elements have the same default value. In a traditional array, memory is allocated for every element, regardless of whether it holds a meaningful value or the default value. However, in a sparse array, memory is allocated only for the elements that have non-default values. We didn't use a sparse array in our project but after learning from Rachit's project, we learned that we could implement a sparse array for our spot the diff game if we used the tiles library to create a grid of 2D arrays. Only the areas where there is a "difference" would contain an array with non default values, if the user clicked on these areas, the arrays would get the click and be able to return that the user found the difference.

FRQ 4

FRQ 4 is related to interfaces. There is a direct connection to how we use interfaces since basically all JPA repositories are interfaces. Interfaces in the context of project-based learning refer to the points of interaction and connection between various elements within a project. These elements, in our case, can include Person, notes, and roles.

In our project, we definitely used a public interface for the log in feature, but we did use "public interface Link extends JpaRepository<Template, Long>" in Emma's feature.

Screenshot 2024-02-26 at 9 16 57 AM

Here, the code segment above showcases the use of method control structures in the context of a Spring Data JPA repository interface. It extends a generic repository interface (JpaRepository) to inherit standard CRUD operations and includes a custom query method for fetching data based on the operating system name. I think this is a pretty standard way that shows the way inheritance can lead to greater code efficiency.

Reflections

TheoH32 commented 7 months ago

CROSS OVER GRADING

FRQ 1 : .9/.9

FRQ 2: .9/.9

FRQ 3: .9/.9

FRQ 4: .9/.9

FINAL SCORE: 3.6/3.6

TheoH32 commented 7 months ago

FINAL SCORE: 3.8/4