2018 FRQ 1
CB
public boolean simulate () {
int goalDistance1 = 0;
for( int i = 0; int i < FrogSimuation.maxhops(); i++ ) {
int goalDistance1 = maxHops * hopDistance;
if (goalDistance == goalDistance1) {
return 1;
}
else {
return -1;
}
int count = i;
}
}
public double runSimulations (int num) {
double proportion = count/num;
System.out.println(proportion);
}