Add an optional parameter to the constructor to cause getAvg() to return zero instead of causing a divide-by-zero situation if it is called before any readings are recorded.
Add an optional parameter to the constructor to cause getAvg() to return zero instead of causing a divide-by-zero situation if it is called before any readings are recorded.