AK FRQ Learning - yajatyadav/intellijs GitHub Wiki

repel: https://replit.com/@AkshitPrathipat/BurlywoodStylishDisks#Main.java

Frq 2

I think understanding the format of how the FRQ works was quite a challenge at first. I was able to use some of the things I learned in unit 5 like constructors and class notation.

  • I also learned how to manipulate strings in this FRQ as well to create the new string function
  • I also learned how to use the math class to perform computations
  • I additionally learned how to construct new Lightsequence objects
 public String insertSegment(String segment, int ind) {
        return sequence.substring(0, 4) +
                segment +
                sequence.substring(4);
    }

    public void changeSequence(String sequence) {
        this.sequence = sequence;
    }

FRQ 3

The first question in this FRQ involved taking in information about an event including if the user would rsvp and what their food selection would be.

public void Part2 () {
    if (rsvp == true) {
            String finalString = "Thank you for attending! You will be served ";
            if (selection == 3) {
                finalString = finalString.concat("pasta.");
            }
            else if (selection == 2) {
                finalString = finalString.concat("chicken.");
            }
            else {
                finalString = finalString.concat("beef.");
            }
        }
    
  }

More code

public DinnerParty (boolean reserve, int select) {

      rsvp = reserve;
      selection = select;

I learned how to use if, else if, else statements. I learned how to concatenate strings: put them together. I also learned how to integrate user input into the code as well. I furthermore was able to use overloaded constructors and understand that logic as well. This project gave me a good understanding of the basics of java.

Part 2 (PBL implemented)

  • I worked with my team to create method to draw the square. We had to use math to use constants and variables to center the coordinates from the origin instead of having it appear in the wrong places.
  • We had to use draw square function to get a display as well
  • Used compound boolean expressions to deal with restrictions of the case of the user inputting coordinates too large for the grid.
public static void drawSquare(int x, int y, int len){
  if (x + len >10 && y -len < 0) {
    len = Math.min(10-x, y);
    }
  else if (x + len >10){
    len = 10-x; 
    }
    else if (y - len < 0) {
      len = y;
      }


drawLine(x, y, x+len, y);
drawLine(x, y, x, y-len);
drawLine(x, y-len, x+len, y-len);
drawLine(x+len, y-len, x+len, y);
int area = len * len;
System.out.println(String.format("Side length = %d, area = %d", len, area));

} 

FRQ 4 Iteration

  • The main focus here was loops in coordination with arrays and array lists as well.
  • The coin game taught be a lot as well:
  • This taught me how the first index of a string is zero, not one that originally made my for loop not work. The Coin Game frq was really complex and took the most time. The hardest part of the FRQ was integrating each individual randomized player action with the main method that runs the overall game.
  • Key Learnings:
  • I learned that constant review of loops was vital

FRQ 5 Invitation/ PW generator

  • part 1: I learned how to write 2 string methods, I learned how to specify parameters and deferent methods to use for PW, I learned how to use input characters via array list.
  • part 2: The invitation allowed me to understand some concatenation
  • I was able to understand the key word: :"this" is PW generator Learning: Through these FRQ's I was able to solid my understanding of classes and really understand the basics of Java

FRQ 6 Arrays FRQ used arrays for assigning the different words for the first question and then different wages for different employees for the second question. Learned:

  • for loops for used to check salary for employees
  • he FRQ was important for understanding how to iterate through the arraylist. Since this is only one data structure, I hope to learn future ways of storing data in java like Hashmaps or LinkedLists.
  • Used math function to calculate the bonus wage as well

FRQ 7

  • The dichotomy of arrays and array list were discovered in this unit. Learned
  • using statements to compare array lists
  • use of if/else statements

FRQ 8 2D arrays

  • Focused on using of 2D arrays Learned:
  • understood boolean statements in a deeper level
  • Using loops to calculate the function max payed

FRQ 9

  • The key word extend was used
  • used scanners to get basic information
  • integrated other things into the FRQ class
  • What I found interesting was a bug when using scanners with Doubles where it would mess up the next scanner, but String would not.
  • This FRQ really helped me understand the important properties of Object Oriented Programming, such as inheritance and polymorphism. I think that this unit provided a lot of useful concepts that will come into use as I progress as a programmer. I

FRQ 10

  • Applied the math function
  • Used algorithm to find the gcf of 2 numbers
  • This FRQ was an interesting continuation of my earlier unit on loops. It was interesting to see how recursion did something very similar to loops, but just in a different way.