import java.util.ArrayList; public class MovingAverage { private ArrayList data; private int period; public MovingAverage(int period) { this.period = period; this.data = new ArrayList(); } public void addData(double value) { this.data.add(value); if (this.data.size() > this.period) { ...