sclass Scorer { double score, total; void add(bool correct) { ++total; if (correct) ++score; } void print() { main.print(ratioToIntPercent(score, total) + "% correct (n=" + total)); } }