1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ede4ka [16]
3 years ago
14

Write a method with the signature "float sumArray(float[] data)" that takes an array of floats, and returns their sum.

Computers and Technology
1 answer:
My name is Ann [436]3 years ago
8 0

Answer:

I will code in JAVA.

Preconditions:

  • The float array of data are declared and initialized.

public float sumArray(float[] data) {

float sum = 0;

for(int i = 0; i < data.length; i++) {

   sum = sum + data[i];

  }

return sum;

}

Explanation:

First, you have to declare a variable sum of type float and initialize with 0. In addition, this method has a for-loop to go through whole array of data and each element is added to the float value to sum. When the for loop ends, the sum variable is returned.

You might be interested in
Each time the enter key is pressed, word creates a new paragraph. (points : 2) true false
ludmilkaskok [199]
Your answer would be true
6 0
3 years ago
How to take a key off a keyboard without breaking it?
klio [65]
You can carfully wedge something in between the key and gently pull up 
4 0
3 years ago
Gps receivers are commonly used by individuals to determine their geographic location while hiking and to obtain driving directi
soldier1979 [14.2K]
I think it is true also.
7 0
3 years ago
The engine flywheel bolts to the Rotor Pistons Front axle Crankshaft
swat32
The answer is D. Crankshaft.  The flywheel is connected to the crankshaft. The crankshaft<span> is </span>connected<span> to the pistons and moves in a circular motion to move the engine. Spark Plugs are based at the top of the pistons, this is used to ignite fuel in the pistons that move them. The timing belt is </span>connected to the crankshaft<span> and it rotates the camshaft. </span>
5 0
3 years ago
Type the correct answer in the box. Spell all words correctly. Code in which server-side language can be embedded into an HTML d
Zarrin [17]

Answer:

What does the letter T in SMART goal represent? The letter T in SMART goal stands for .

Explanation:

Type the correct answer in the box. Spell all words correctly. What does the letter T in SMART goal represent? The letter T in SMART goal stands for .

A:

The correct answer would be, Time based goals.The letter T in SMART goal represents Time based Goals.Explanation:SMART goals is an approach in Business Administration. It is basic…

6 0
2 years ago
Read 2 more answers
Other questions:
  • Write a void function SelectionSortDescendTrace() that takes an integer array, and sorts the array into descending order. The fu
    9·1 answer
  • . It is essential for a relay energized by alternating current to have A. many turns of small wire. B. a laminated core and a sh
    8·1 answer
  • Which statement about creating folders is TRUE?
    15·2 answers
  • Demand is created through meeting customer buying criteria, credit terms, awareness (promotion) and accessibility (distribution)
    10·1 answer
  • Tech A says that gasoline vapors are lighter than air, so inspection pits do not have a fire hazard like above ground hoists. Te
    9·1 answer
  • What does the top level domain in a url inducate? A. The organization or company that owns the website. B. The organization or c
    6·2 answers
  • Write a program using for loop to find the cube of numbers from 50-100 <br> FASTT
    11·1 answer
  • Brook is designing a database that customers can use to find their ideal vacation spot. If they only want to see beach vacations
    15·2 answers
  • if a hacker wants to exploit the TCP three-way handshake, what is the most effective way to go about it?
    15·1 answer
  • What is one way object-oriented programming differs from procedural programming?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!