VINERAJ / CSAblog2.0

Apache License 2.0
1 stars 0 forks source link

Connections between FRQ and PBL #10

Open VINERAJ opened 9 months ago

VINERAJ commented 9 months ago

FRQ 1

This FRQ involves Arrays and 2D Arrays. These can be used to store data for later use, meaning that they are a very important part of any Java project. In our project, we use 2D arrays in our quiz game. We have a 2D array to store the quiz questions, where each question is an "array" in the 2D array, and each array has the question, the answer choices, and the true answer.

//example of 2D Array
  String[][] allQuestionsMCQs = {
        {
            "What is the result of True and False in Java?",
            "A) True",
            "B) False",
            "C) None",
            "D) Error",
            "Answer: B) False"
        },
        {
            "What does the 'not' operator do to a boolean value?",
            "A) Changes True to False and vice versa",
            "B) Performs a logical 'AND'",
            "C) Performs a logical 'OR'",
            "D) None of the above",
            "Answer: A) Changes True to False and vice versa"
        },
        {
            "How can you check if two values are not equal in Java?",
            "A) =!",
            "B) <>",
            "C) !=",
            "D) ~=",
            "Answer: C) !="
        },
        {
            "What is the outcome of '5 > 3 or 2' in Java?",
            "A) True",
            "B) False",
            "C) 2",
            "D) SyntaxError",
            "Answer: A) True"
        },
        {
            "How does Java evaluate 'not True or False'?",
            "A) True",
            "B) False",
            "C) None",
            "D) Error",
            "Answer: B) False"
        },
        {
            "What is the result of 'True and not False'?",
            "A) True",
            "B) False",
            "C) None",
            "D) Error",
            "Answer: A) True"
        },
        {
            "How do you check if a value is greater than or equal to another in Java?",
            "A) >=",
            "B) =>",
            "C) =<",
            "D) <=",
            "Answer: A) >="
        },
        {
            "What does 'False or True and False' evaluate to?",
            "A) True",
            "B) False",
            "C) None",
            "D) Error",
            "Answer: B) False"
        },
    };

Having a 2D array to store our questions enables us to quickly and easily access the questions and the answers to display to the user, and to check if the answer the user has inputted is correct.

FRQ 2

This FRQ involves classes, and their creation. Obviously every Java project is going to involve the creation of classes. In our project, we use Java classes when we make a new GameScore when the user is finished with a game and passes their score to the backend to be stored there and called when scores need to be updated.

static class GameScore {
        private String username;
        private String gametype;
        private int score;

        public String getUsername() {
            return username;
        }

        public void setUsername(String username) {
            this.username = username;
        }

        public String getGametype() {
            return gametype;
        }

        public void setGametype(String gametype) {
            this.gametype = gametype;
        }

        public int getScore() {
            return score;
        }

        public void setScore(int score) {
            this.score = score;
        }
    }

The GameScore class has private variables that are initialized at the beginning of the class, and it has getter and setter methods to update and return those variables. Because of these methods, along with the fact that the class does not implement or extend any other classes, the GameScore class is a POJO, or a Plain Old Java Object. POJOs allow for data to easily be stored and reused. This makes them necessary for our project, since they enable us to score the data needed for us to store score data in the backend, like the user's username and their score.

FRQ 3

FRQ number 3 also deals with 2D arrays, though in this FRQ, it is a specific type of 2D arrays, the sparse array. Since I already talked about how our final project uses 2D arrays, I'll talk about how we could use sparse arrays in our project. We have not used sparse arrays as of yet, but one area where we could use sparse arrays is on our frontend. We store the score and username details for the current user on the frontend, so we could use sparse arrays if the user does not have a score for any game yet.

FRQ 4

This FRQ deals with methods and control structures. We used control structures in our quiz project, to generate a list of 10 questions from the 2D array mentioned earlier.

@GetMapping("/allqs")
    public ResponseEntity<?> getQuestions() {
        var response = new Object() {
            int[] randIndex = new int[10];
            String[][] questions = new String[10][];
            Random rand = new Random();
            {
            for (int i=0; i<10; i++) {
                int rand1 = rand.nextInt(allQuestionsMCQs.length);
                randIndex[i] = rand1;
                questions[i] = allQuestionsMCQs[rand1];
            }
            }
            public final String[][] mcqs = questions;
        };
        return ResponseEntity.ok(response);
    }
} 

After generating a list of 10 random integers, we use a for loop to add the questions located at those indices in our questions array. This for loop enables us to easily loop through and add the random questions to a list, which can then be sent to the frontend.

Final Reflection

Taking this exam gave me valuable experience, not only in taking College Board FRQs, but by giving me a chance to review concepts in Java that I may not have used in our final project as of yet, and ones I might be rusty in. It also gave me an opportunity to think further about our project, and about ways to improve and add onto it in the future.

While the FRQs weren't overly challenging in themselves (that is to say they provided a fun challenge to solve), I found that the one thing I struggled most in was time management. I feel like it took me too long to do the FRQs, especially since I will have only an hour and 30 minutes to complete the FRQs on the actual AP exam. Part of the reason for this problem is the fact that I needed to use the internet to figure out things like syntax, since I had forgotten them. I won't be able to use things like Google on the AP exam, so I need to work on memorizing syntax.

In the future, I will work on more FRQs to practice my skills. This will not only benefit me on the AP exam, but I think it will help me in future PBL projects in CSA, since taking more FRQ tests can give me ideas on how to solve problems in our Java code, or give us ideas on new features to add.

aidenhuynh commented 9 months ago

2015 FRQ Crossover Review

FRQ Scores:

Note: We demonstrated running code in notebooks to verify functionality

FRQ # Comments Score
1 Code runs as expected and FRQ type correctly identified 1.0/0.9
2 Code runs as expected, type is Methods and Control Structures 0.9/0.9
3 Code runs as expected and FRQ type correctly identified 1.0/0.9
4 Code runs as expected, FRQ type correctly identified, and additional code for clarity in output 1.1/0.9
Overall Combined score for 1.1 scale FRQs 4.0/3.6

Association Comments:

I think that your reflection is very insightful and clearly shows the learning you have gained from doing the FRQs. The fact that you had most of the elements from the FRQs in your project is also a great demonstrator of the power of PBL as an educational method.

For your FRQ 3 response, I understand that SparseArrays are pretty uncommon (I did not use one either), but you could have still related the problem to Methods and Control Structures. However, I do appreciate the inclusion of how you could include SparseArrays specifically.

I would like to further highlight your future plans, as writing out your next steps is an excellent way to solidify learning and prove that what you did was actually meaningful.

Association Score:

Overall, I would give you a 3.9/3.6 for your FRQ Association.

QDBordtoshred commented 9 months ago

FRQ Crossover Review

FRQ Scores:

FRQ Score Comments
1 1/0.9 Identified this FRQ as an Arrays/ArrayLists or 2D Arrays type FRQ (accurate) also includes nested for loops
2 1.1/0.9 Shows understanding of application of these CB concepts
3 0.95/0.9 Identified this FRQ as 2D Arrays type FRQ (accurate) Very thorough
4 1/0.9 Shows understanding/ Identified FRQ type as Interfaces (but also Methods and Control Structures) (correct)
Overall 4.05/3.6

I find your reflection to be remarkably insightful, showcasing a clear understanding of the knowledge gained through engaging with the FRQs. It's noteworthy that the incorporation of most FRQ elements into your project underscores the effectiveness of Project-Based Learning (PBL) as an educational approach.

Association Score: 3.85/3.6