The Capsis training online
Try to work with the helping elements before looking at the solution…
Helping elements
private boolean treeSurvival()
double survivalProba = 0.98; double proba = random.nextDouble (); // [0,1[ return proba <= survivalProba; // returns true in 98% of the cases
A possible solution