Write a method called sumArray that accepts an array of floating point values and returns the sum of the values stored in the array.

What will be an ideal response?


```
public float sumArray(float[] values)
{
float sum = 0;
for (int index = 0; index < values.length; index++)
sum += values[index];
return sum;
}
```

Computer Science & Information Technology

You might also like to view...

What is the advantage of the C++11 integer data types over the old data types?

a. Number of bits allocated changes dynamically as needed b. No advantage, just new names c. Specifies exact size in bits d. Higher precision

Computer Science & Information Technology

Perl operator =~ is used to ________.

a) test whether two strings are identical b) test whether two values are equal c) test whether two values are not equal d) test whether a value is greater than another

Computer Science & Information Technology

In the accompanying figure, the status of the appointment is Free.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The adjusted cell references in a copied and pasted formula are called ____ references.

A. related B. relative C. pasted D. alternative

Computer Science & Information Technology