### Question:
PercentageChanceGenerator implements Generator<Boolean> { @Override public Boolean next() { return generator.next() < chance; } PercentageChanceGenerator(int chance); @Override Boolean next();  }### Answer:
@Test public void percentageChances(){ for (int p = 1; p < 100; p++) { Generator<Boolean> percentageChance = RDG.percentageChanceOf(p); for (int i = 0; i < 10000; i++) { results.add(percentageChance.next()); } print(p); print("True: " + results.count(Boolean.TRUE)); print("False: " + results.count(Boolean.FALSE)); results.clear(); } }