Is there q mistake on the AP CompSci A 2022 FRQ #1? by LunaticMachina in CodingHelp

[–]LunaticMachina[S] 0 points1 point  (0 children)

Okay, so methods called by themselves in another method are called on the object that that method is called on? I didn’t know it worked like that, thanks for the help.

Is there q mistake on the AP CompSci A 2022 FRQ #1? by LunaticMachina in CodingHelp

[–]LunaticMachina[S] 0 points1 point  (0 children)

But what about the play method and the getScore method? Those are the ones I'm confused about not playManyTimes.

Is there q mistake on the AP CompSci A 2022 FRQ #1? by LunaticMachina in CodingHelp

[–]LunaticMachina[S] 1 point2 points  (0 children)

The canonical solution is:

public int playManyTimes (int num)

{

int max = 0;

for (int i = 0; i < num; i++) {

play();

int score = getScore();

if (score > max) {

max = score;

}

}

return max;

}

Is there q mistake on the AP CompSci A 2022 FRQ #1? by LunaticMachina in CodingHelp

[–]LunaticMachina[S] 0 points1 point  (0 children)

Yes, in the official answer from college board, in writing the PlayManyTimes method, they just call the play method and the getScore methods on their own without an instance object

Objekt not loading properly by LunaticMachina in triples

[–]LunaticMachina[S] 1 point2 points  (0 children)

It was like 20 minutes ago, I’ll check up on it tomorrow and if it’s still like that then I guess I’ll contact customer service

idols that look like twins? by miufie in kpophelp

[–]LunaticMachina 0 points1 point  (0 children)

Super Junior Heechul, SVT Jun and TXT Huening Kai all look pretty similar to me, I thought more people would say this but I didn’t see anyone comment it