7unlim / fastpages

Apache License 2.0
0 stars 0 forks source link

Team Lesson #7

Open 7unlim opened 1 year ago

7unlim commented 1 year ago

2022 FRQ Iteration Notebook

Part A


    int points = 0;
    if (levelOne.goalReached()) {
        points += 200;
        if (levelTwo.goalReached()) {
            points += 100;
            if (levelThree.goalReached()) {
                points += 500;
            }
        }
        else {
            if (levelThree.goalReached()) {
                points += 500;
            }
        }
    }
    if (game.isBonus()) {
        points * 3;
    }
    System.out.println(points);
}
getScore(null);```

Part B 

```public int playManyTimes(int num) {
    int highestScore = 0;
    for (int i = 0; i < num; i++) {
        play();
        if (getScore() > highestScore) {
            highestScore = getScore();
        }
    }
    System.out.println(highestScore);
}
playMainTimes(null);```