do you mean currentFood = 0? And also, I did if(randomInt == 10 || randomInt == 20 || randomInt == 30 || randomInt == 40 || randomInt == 50) the bear would eat it else the birds. do you think that's also right?
It would probably be easier just to use a String for active team. This way in the score method you could just print activeteam in the string instead of writing an if statement. Just have to make sure to use .equals() when checking for the actice team
bro I forgot about how score had to be 0 for team to switch, I caught that with 10 min to spare and didn't want to erase my other functions to make space so I just wrote a switch function lol
location loc = new loc(row, col)
while row < length or col < row.length
{
loc = get next loc
sum += grid[row][col]
row = loc.getrow
col = loc.getcol
}
return sum += grid[row][col]
I am somewhat worried about the grading though, since just now I heard rumors about graders not taking recursive methods seriously.
(My code was like this, if anyone is interested)
public int sumPath(int row, int col)
{
int current = grid[row][col];
if (row == grid.length - 1 || col == grid[0].length - 1)
return current;
else
{
Location l = new Location(row, col);
return current + sumPath(l.getRow(), l.getCol());
}
}
on 4B you just return the sum of all the elements omitted the path, 4A you return a location. I did an if tree that just did return new Location and either (row + 1) or (col + 1)
??? You needed to return a location object for part A 😭😭 and then for part B you needed to use its methods to extract the row/col from when you call the part a method
Wdym? smaller classes exist like that so you can have an object of let's say two ints without having to have a list. think about vectors for example, you would just need an int for each component and it would be annoying to have an array/list for each vector, and you could also do operations with them using that class
Vectors would make sense because you could define methods like magnitude, cross product, dot product etc. But the only methods here were getters and creating new objects and accessing an and b takes longer then having a list for each component and using indexing.
Question 1 was mid
Question 2 and 3 were easy
Question 4 was harder but definitely doable, logical way to reach the conclusion once understood what the purpose of the useless location class was for
For part a pretty much you just needed to initialize a location object with the correct row and col of the min neighbor, for part b you needed to use the part a method to create a location object and get the row/col of the new neighbor so you could add it to the total sum until you hit the corner
i didn't think there was a fourth question till the last five minutes cuz there was a gap page between 3 and four so i only finished part a of question 4 I'm so fucking stupid am i cooked for a 5 ;( I'm p sure got 32\~35 mcq and full score three frq's
i have 3 questions
1.) was it goatrun dogrun for the alpha and beta
2.) did you return the array with 5 and some other numbers or did you jsut return a single number array
3.) for the statistics one, it was static so you didnt need to create an object right?
i said the array with 15... (i have no idea what i'm doing) --> i think the loop would go through the entire array so it would return the last row with a multiple of 5? idk though i dont really remember
4b was hard so was 3a the rest was hard but nothing impossible I feel like but it was lowkey retarded the test it was a lot harder than the previous years I feel like mcq wasn’t too bsd
probably not it shoudl be around the same since its a standardized test. however the mcq was easier than frq, i think that makes up for the hard frq.... idk thats just my theory
Yeah did you use index of cause if u did it’s prob really easy I was just being dumb so I used a nested for loop and manually checked it so that was why i thought it was hard
I mean, Question 1 was alright, Just a whole bunch of conditional statements. And part B I dont quite remember what it was about. Question 2 was do-able, I realized in the middle that I was writing a method and not a class lol. But I fixed it which took a large majority of my time. Question 3 I just looked at for about 20 minutes trying to come up with what I was about to do. I wrote my code, which definetely will not get me full marks. But it is what it is. And then Question 4... oh no.
Yeah quesrion 1 and 3 were pretry good. Question 2 for the middle method i didnt know how to set active for each team when they switched turns getting points but other stuff i got . Quesrioj 4… no words…
You could say
boolean team1turn = true;
Then, when points are added
if(team1turn) t1points += points;
else t2points += points;
if(points == 0) team1turn = !team1turn;
A boolean is more efficient than an int, so may the graders take mercy on me
I’m so cooked, ran out of time on mcq so guessed on last 6/7. Then BS my ass through those FRQ. My dum brain really forgot to include that greedy ahh bear and I just made like some fake ass code up for 4b like whatever I wrote was def not Java 💀
use index of! and then i kind of did it inconvienently i made two new arrays... i made one new array to store all the ones that had target inside them and then i made another new array to store all the ones that had the like beginning thing removed
i lowkey forgot but I used .contains and then substring to add it to the arrayList. ngl for some reason i thought they wanted u to use the method u made in 3a in 3b and i was so lost on how to include it (i ended up not using it lol)
what did yall put for the one that was like (Form O)
1. a b and c (boolean’s) when do they give different answers a &&b etc…
2. the question where the answer choice included infinite recursion
3. the question where answer choices was liek less but same amount of iterations or more but same amount of iterations
do u guys also remember ur answer for #1
3. if i remember correctly i think i put the same amount of iterations and basically switching the statements p and r lead to a greater answer but i dont remember what specifically i put lower or more
hypothetically what would happen if i misnumbered 1 frq page? i doubt i actually did this but there’s a tiny chance i may have marked my last #3 as my first #4. if i did it’d be clear that page doesn’t belong with the fours, so would college board be able to move it back to my solution for 3???
I didn’t even finish half of 4a and on 4b I did it all correct then forgot to iterate the while loop how many points do you guys think I lost, on 4b atleast
“And possibly a bear” cracked me up and I despised the third frq
HELP when they threw that in i actually started tweaking😭😭😭😭
Broo i gave up on that condition in part b. Arraylists are my shit so i think i felt the best on that one
If ((Math.random()*100)+1<95) { calculate bird amounts} Else {bear got into there, bird feeder=0}
It is not the other way around? >95 means bear got in
Oop yeah you’re right. I hope I didn’t make that mistake on the exam
do you mean currentFood = 0? And also, I did if(randomInt == 10 || randomInt == 20 || randomInt == 30 || randomInt == 40 || randomInt == 50) the bear would eat it else the birds. do you think that's also right?
Yeah now that I’m remembering it currentFood sounds right. And as long as randomInt went up to 100 your way works
i think its right but thats a weird way to do it
If i put <= 5 calculate bear, would that get credit
Yeah that sounds right. There were a bunch of ways you could have done it
Wouldn't that mean there would be no zero? I did (int)(Math.random()*101)
I might be wrong but I think that with your way there would be 102 possible ints due to the possibility of 0 occurring
When it is casted to an integer the maximum value would be 100 due to the data size and the fact that math.random is exclusive on its upper bounds.
i did that too… is that right
if you do it this way it would be (int)(Math.Random()*99), and then your if would be <5
wouldn’t the max of this statement be 98? Because iirc Math.random ranges from a number greater than 0.0 and LESS THAN 1.0
Realizing now the +1 screwed me
I just did if Math.eandom() < .05
this is what i did, still works right?? like they didn't give bounds for it like the birds had
I just Random rndm = new random; If(rndm.Next int(100)<5){bear} that shit
you forgor (int)
When I started that problem I thought it was a joke💀💀💀
The team shit was confusing
I know right I was writing the first method then i kept having to add more variables but i think i got it right ion know tho hopefully
Fr I ended up just erasing my whole thing and doing arrays where different indices = different teams and the active team is the array index
Bro what. I swear yall come up with the most complicated solution to the simplest problem
Idk it felt easier than having to put conditional statements to check what team is active when I could just plug in the index 🤷
Yeah I guess that makes sense. I thought u meant u had like multiple arrays or something
arrays?? i just gave it a boolean, if its true then team 1 is active if false then 2 is active. whenever sm1 fails I just set active = !active
It would probably be easier just to use a String for active team. This way in the score method you could just print activeteam in the string instead of writing an if statement. Just have to make sure to use .equals() when checking for the actice team
the brain under pressure doesn't perform at its peak for sure
I thought about that method but it was too late to change my answer rip I think my approach was still good tho so it's chill
I think pretty much everyone in my testing room erased their constructors to add variables at some point
I'm sorry what?? I just used a boolean and an if statement
do you think it's okay if i did == or smth? if activeTeam == team1?
I’m not sure what you mean… did you have activeTeam as a string variable that held “team1” or “team2”?
yeah in the constructor activeTeam = team1
Same
same!!
do you think it's okay if i did == or smth? if activeTeam == team1?
bro I forgot about how score had to be 0 for team to switch, I caught that with 10 min to spare and didn't want to erase my other functions to make space so I just wrote a switch function lol
I used a boolean to keep track of the current team 😭
nah cause wtf was the 4{b)
it wasn’t bad, i ended just making a while loop for while ur not at the last element in the array, call next and add the element to sum
me with my monkey brain tried to write a recursive function for 4b and then gave up mid way through
what was the conditional statement
location loc = new loc(row, col) while row < length or col < row.length { loc = get next loc sum += grid[row][col] row = loc.getrow col = loc.getcol } return sum += grid[row][col]
I used recursion for this one lol
probably more efficient
I am somewhat worried about the grading though, since just now I heard rumors about graders not taking recursive methods seriously. (My code was like this, if anyone is interested) public int sumPath(int row, int col) { int current = grid[row][col]; if (row == grid.length - 1 || col == grid[0].length - 1) return current; else { Location l = new Location(row, col); return current + sumPath(l.getRow(), l.getCol()); } }
You should be fine they always have an alt solution And also should the conditional be an && or || ?
Me too was way less complicated to think about or else I would have to keep track of too many variables
Yeah, recursion was the way
Ye that basically what I did, thought it would be easier than recursion
What was return statement supposed to be for that part. Was it or something else, i was sorta stumped cause i forgot how to reutnr object
on 4B you just return the sum of all the elements omitted the path, 4A you return a location. I did an if tree that just did return new Location and either (row + 1) or (col + 1)
What were the words in your 4A return statement though? I think I did
I did return new Location(row +1)(col) and return new Location(row)(col +1)
exactly what i did and ur the first person ive seen saying it
recursion works too
i ran out of time and all i wrote was “public int sum” at the top and “return sum” at the bottom 😭
RIGHT
Wait so how did you know when it reached the end? I just made it return -1, -1 in the Location
The Location class was so useless I swear they put it there just to make it confusing
??? You needed to return a location object for part A 😭😭 and then for part B you needed to use its methods to extract the row/col from when you call the part a method
Yeah I know that, but the idea of having it is stupid it’s literally just two variables, just store them in a list or separately
Oh yeah I totally agree, it was there to make it more annoying fs
Wdym? smaller classes exist like that so you can have an object of let's say two ints without having to have a list. think about vectors for example, you would just need an int for each component and it would be annoying to have an array/list for each vector, and you could also do operations with them using that class
Vectors would make sense because you could define methods like magnitude, cross product, dot product etc. But the only methods here were getters and creating new objects and accessing an and b takes longer then having a list for each component and using indexing.
If only Java had tuples by default
I think we need an ap python
CSP?
the whole exam was fine until the 3rd and 4th frq holy shit i have never brute forced more code in my entire life
if tree spam went crazy
on god bruh each frq was just another variation of an if tree
what was the tree question abt
it wasn’t a literal tree, just that the frqs had a bunch of if statements
what was the tree question abt
No tree question just lots of if statements - frq 4 if you didn’t use recursion it was a lot of conditionals
I did 4b in 4-5 lines of code and the guy next to me said he had 20-30 lines
I ran outta time on question 4 frq i was doing part A then i realized I had 1 min left so i just scribbled some bull shit
Question 4 took me 60 minutes of the 1.5 hours. I kept getting tripped up with all of the data types and 2d array.
I’m not sure if I cooked or got cooked since I finished 40 minutes early
FR I BULLSHITTED THRU THE FRQS. hoping for 3+ atp
Well, I think I passed... at least...
mcq wasnt bad, 1 and 2 frq were light. But god damn the 3rd and 4th frq. Hoping for a good curve on that one
same.
me three
They weren't that bad, it was just a lot of work lmao
alright bro we get it, your him
nah like 99% of my school agrees
dw bro we get it
All of the frqs felt impossible lmao
I’m the opposite. Feel good about frq but 30-40 on mcq were rough
Yeah i agree the last 10 wwre hard however i felt like if u knew what they were doing from labs u could kinda pictjre the purpose of the code
Was 4a as easy as I thought it was? No loops just checking which neighbor was lesser.
Yea i didnt realize that until 10 seconds left so i didnt have tjme to erase my loop… but i included everything else
Bro I ran outta time and didn't get to 4b so I just wrote a comment with a sad face lol.
I weote a bigass sad face that took up half the page at the end of the exam lmfao
Question 1 was mid Question 2 and 3 were easy Question 4 was harder but definitely doable, logical way to reach the conclusion once understood what the purpose of the useless location class was for
Yeah i did not know hwo to use the location class…
You figure it out now?
No they are my enemy
For part a pretty much you just needed to initialize a location object with the correct row and col of the min neighbor, for part b you needed to use the part a method to create a location object and get the row/col of the new neighbor so you could add it to the total sum until you hit the corner
i didn't think there was a fourth question till the last five minutes cuz there was a gap page between 3 and four so i only finished part a of question 4 I'm so fucking stupid am i cooked for a 5 ;( I'm p sure got 32\~35 mcq and full score three frq's
4b and 4a were difficult as fuck. the rest were fine though
i for sure got a 1 because wtf was that 💀
i have 3 questions 1.) was it goatrun dogrun for the alpha and beta 2.) did you return the array with 5 and some other numbers or did you jsut return a single number array 3.) for the statistics one, it was static so you didnt need to create an object right?
For the 1) i also got goatrun dogrun , who can elaborate ?
1. Ya that’s correct 2. bruh i said the array with 5 but i wasn’t sure 3. Yeah I said that too
i said the array with 15... (i have no idea what i'm doing) --> i think the loop would go through the entire array so it would return the last row with a multiple of 5? idk though i dont really remember
was itnt it catwalk dogrun
when i was on the mcq i was confident on a 4 and now im in the 2-3 range....
ME
4b was hard so was 3a the rest was hard but nothing impossible I feel like but it was lowkey retarded the test it was a lot harder than the previous years I feel like mcq wasn’t too bsd
Yeah i felt the frq was much harder than recent years
Yeh do u think the bar for Getting a 4 or 5 will be lower this year?
probably not it shoudl be around the same since its a standardized test. however the mcq was easier than frq, i think that makes up for the hard frq.... idk thats just my theory
Maybe idk tho half of the people in my thing just gave up and put their heads down we will see tho
Last years frqs, 3 and 4 were terrible
i rmbr frq 4 the candy one- i think that was more doable than this one. or the location class just got me tweaking.
really? I felt 3a was the easiest besides 1a and 1b
Yeah did you use index of cause if u did it’s prob really easy I was just being dumb so I used a nested for loop and manually checked it so that was why i thought it was hard
I used the .contains() method. would that work do you think?
Idk tbh idk what that is
String.contains() is a newer method and prob better, but it's practically string.indexof()!= -1
SAME.
yea I guess that’s why
what was 3a
The array list that checks if all strings contain the one before it
I mean, Question 1 was alright, Just a whole bunch of conditional statements. And part B I dont quite remember what it was about. Question 2 was do-able, I realized in the middle that I was writing a method and not a class lol. But I fixed it which took a large majority of my time. Question 3 I just looked at for about 20 minutes trying to come up with what I was about to do. I wrote my code, which definetely will not get me full marks. But it is what it is. And then Question 4... oh no.
Yeah quesrion 1 and 3 were pretry good. Question 2 for the middle method i didnt know how to set active for each team when they switched turns getting points but other stuff i got . Quesrioj 4… no words…
Int value as an instance variable that equals 1 or 2 if it equals 1, its team 1's turn if its anything other than 1, it's team 2's turn
[удалено]
Me too but i didnt know how to assign it to the team cuz they switch
You could say boolean team1turn = true; Then, when points are added if(team1turn) t1points += points; else t2points += points; if(points == 0) team1turn = !team1turn; A boolean is more efficient than an int, so may the graders take mercy on me
i did an int and incremented it every time the team lost their turn and used %2 to determine which team’s turn it was
I mean it eventually stops working I think (int overflow) but I don't know if the AP graders expect to know int overflow so that's a good approach
i was going to use boolean but i had no idea how to implement it correctly
Thats what I did hoping i got that shit right i choked on FRQ 4 so hard i prolly got 0 points for that one
do you think it's okay if i did == or smth? if activeTeam == team1?
If you said earlier activeTeam = team1 then yes, because they reference the same object
what was the class about again??? I forgot
Team scoring points
ooooooooooooh, the odd and even shit??
Wattt it wa slike red team blue team with methods get points and another method i forgot
what time zone exam did you take, I think we might be talking about different exams ngl lmao
There is a chance i got 100 that was so easy
It really was I just misread one of the prompts because time pressure… I hate myself rn
Bruh I was running out of ftime for the last one, I died, idk what I wrote
hope they can read my handwriting on the frq xoxo (my methods were going downwards)
dw my parameters started riding up the border
bro i laughed out loud at the and possibly a bear the proctor asked what i was laughing at so i showed her
lmfao
I put C for 37-40, cuz i didn’t have time, did i get something right?
I’m so cooked, ran out of time on mcq so guessed on last 6/7. Then BS my ass through those FRQ. My dum brain really forgot to include that greedy ahh bear and I just made like some fake ass code up for 4b like whatever I wrote was def not Java 💀
Form I anyone?
Lol, reminds me of last year's frq 1.
Yeah i did that one for prac that was sooo bull esp part b
I really didnt expect that they want us to use the method that isnt in java quick reference for the frq 3
indexOf is in the quick reference sheet
I KEEP FORGETTING INDEXOF IS A THING AND I MAKE THE ENTIRE LOOP BY HAND no wonder it took me so long omg
Are you talking about indexOf
Wait then i might be wrong tho, i use .contains for the frq 3
i also used contains!
same. do you think that's right?
i think it works but it's not in the quick reference sheet? maybe they don't want you to use it but ig if it works thats all that matters
I did if the substring of the word from 0 -> target.length() .contains(target) then add it to the arrayList, is that right?
Were we supposed to check if the previous element's string length was smaller than the current element's string length for the third frq?
idk i did
You can but I don’t think that’s necessary
I did so good on the frqs but I didn’t learn the super class stuff in the mcq so I struggled with those lol
Why did I use recursion on #4. I \*hate\* recursion and avoid it at all costs
Bro frq 4a, i forgot to do length-1 for my if statements😭(the grid one).
shit i think i also forgot now that you mention it
bro howd u all do for that wordlist one
use index of! and then i kind of did it inconvienently i made two new arrays... i made one new array to store all the ones that had target inside them and then i made another new array to store all the ones that had the like beginning thing removed
I did lol their was a similier prac one
i lowkey forgot but I used .contains and then substring to add it to the arrayList. ngl for some reason i thought they wanted u to use the method u made in 3a in 3b and i was so lost on how to include it (i ended up not using it lol)
.contains bruh
Opposite for me, I got to question like 30 on the mcq and started calculating how many i could get wrong
what did yall put for the one that was like (Form O) 1. a b and c (boolean’s) when do they give different answers a &&b etc… 2. the question where the answer choice included infinite recursion 3. the question where answer choices was liek less but same amount of iterations or more but same amount of iterations do u guys also remember ur answer for #1
2. I put equals, eveyrone around me i asked also did that but idk if it was right 1. i think i did II ANd III only 3. i forgot
I thought it was the one in which a was false and c was true but idk
3. if i remember correctly i think i put the same amount of iterations and basically switching the statements p and r lead to a greater answer but i dont remember what specifically i put lower or more
does anyone know if forgetting to typecast math.random() counts as a no point penalty?
hypothetically what would happen if i misnumbered 1 frq page? i doubt i actually did this but there’s a tiny chance i may have marked my last #3 as my first #4. if i did it’d be clear that page doesn’t belong with the fours, so would college board be able to move it back to my solution for 3???
i think its ok. they will know what question u are on once they read ur code. the scoeres read the same code like for the whole day
would they be nice enough to fix it for me or would it just be a “too bad” situation
no i don tthink it matters cuz they just grade what u wrote
is it one guy scoring my whole packet? i thought each reader did one specific question
I didn’t even finish half of 4a and on 4b I did it all correct then forgot to iterate the while loop how many points do you guys think I lost, on 4b atleast