DoubleArrays.java is a module that defines classwide operations for arrays of double values.
Read values from the Keyboard into an arrayPrecondition: Keyboard contains an int n, followed by n double values.
Input: the values from Keyboard
Return: the n input values in a double array
Sum the values in an array of doublesReceive: double [] array
Return: the sum of the values in array
Find the average of the values in an array of doublesReceive: double [] array
Precondition: array.length > 0.
Return: the average of the values in array
Check two arrays for equalityReceive: double [] a1, double [] a2
Return: true iff a1 and a2 contain exactly the same elements
Back to the package documentation index