public class Summer
extends java.lang.Object
Constructor and Description |
---|
Summer()
Initializes a new Summer starting at 0.0.
|
Modifier and Type | Method and Description |
---|---|
void |
add(double x)
add x to the sum.
|
double |
getSum()
Returns the current value of sum.
|
void |
reset()
reset sum to 0.0.
|
java.lang.String |
toString()
Returns a string representation of this summer.
|
public void reset()
public void add(double x)
public double getSum()
public java.lang.String toString()
toString
in class java.lang.Object