public class Moyenne { int count = 0; double all = 0; public void add(Number nb) { count++; all += nb.doubleValue(); } public double getAverage() { return all/count; } }