Implemented Array class for Accumulate exercise to make tests pass