Changes between Version 18 and Version 19 of ProgrammingPrompts
- Timestamp:
- Nov 25, 2015, 10:08:31 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ProgrammingPrompts
v18 v19 44 44 Constructor. Takes a parameter {{{n}}} that determines how many of the recent values to average. 45 45 ==== 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.46 Adds a value to the list, which is allowed to be 0. The average should be updated immediately to reflect this addition. 47 47 ==== double getAverage() 48 48 Returns the moving average of the most ''recent'' {{{n}}} values entered.