// Class that incorporates a number in an accumulated sum (or product). // Each number can be added to a sum or // it can be incorporated in a product. // Student exercise - add product data field and methods multiply() and // getProduct() // modify method main in class LoopTestApp public class Accumulator { // data fields private int sum; // accumulated sum so far // num is next number to add to sum public void add(int num) { sum += num; } // Methods to be implemented // public void multiply(int num) { } // public int getProduct() public int getSum() { return sum; } // Returns a String representing the contents of an Accumulator object // Modify to include product. public String toString() { return "Sum so far is " + sum; } }