2020 #2

class GameSpinner {
    private int sectors;
    private int runLength;
    private int lastSpin;

    public GameSpinner(int sectors) {
        this.sectors = sectors;
        this.runLength = 0;
    }

    public int spin() {
        int spin = (int) (Math.random() * 4);

        // increment runlength if same value as last time
        if (this.lastSpin == spin) {
            runLength++;
        }
        else {
            runlength = 1;
        }

        // set last spin to new value
        this.lastSpin = spin;

        return spin;
    }

    public int currentRun() {
        return runLength;
    }
}

2020 #3

public void addReview(ProductReview prodReview) {
    
}