Module hw06

Class SumAcc

All Implemented Interfaces:
IAccumulator

public class SumAcc extends AAccumulator
Accumulates the sum of the values, starting with a total of 1.
Author:
swong
  • Constructor Details

    • SumAcc

      public SumAcc()
      Constructor for the class
  • Method Details

    • accumulate

      public void accumulate(Object x)
      Description copied from interface: IAccumulator
      Accumulates the given value into the internally stored total
      Parameters:
      x - The value to process for accumulation