Changes between Version 18 and Version 19 of ProgrammingPrompts


Ignore:
Timestamp:
Nov 25, 2015, 10:08:31 PM (9 years ago)
Author:
Timothy Lin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ProgrammingPrompts

    v18 v19  
    4444Constructor. Takes a parameter {{{n}}} that determines how many of the recent values to average.
    4545==== void addValue(double)
    46 Adds a value to the list. Does not directly change the average. The average should be updated immediately to reflect this addition.
     46Adds a value to the list, which is allowed to be 0. The average should be updated immediately to reflect this addition.
    4747==== double getAverage()
    4848Returns the moving average of the most ''recent'' {{{n}}} values entered.