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
100 POINTS!!! PLEASE HELP ME
Ronch [10]

Answer:

1 web

2- invintory

3- spreadsheet

4-survey

Explanation:

hope it helps

5 0
2 years ago
Read 2 more answers
Samuel is working on decimal and binary conversion for his college project. He is using the binary number 111011 and wants to ex
Contact [7]
<span>1 X 25 + 1 X 24 + 1 X 23 + 0 X 22 + 1 X 21 + 1 X 20 thus your Answer is C</span>
4 0
3 years ago
Read 2 more answers
What was ARPANET?
Anit [1.1K]

Answer:

The ARPANET was the first network that provided commercial internet services. And also it was the first network to make use of the TCP/IP protocols. However, you need to know that the first ISP or the internet service provider was the Telenet, and it was the first commercial version of the ARPANET which was introduced in the year 1974. And this service started its service for the customers in the year 1989.

Explanation:

Please check the answer section.

7 0
3 years ago
The source ip address is 164.109.28.3 subnet mask of 255.255.128.0 network address is
Sergeu [11.5K]
164.109.0.0/17




-------------------------------------------
6 0
3 years ago
The following algorithm adds all the entries in a square n × n array A. Analyze this algorithm where the work unit is the additi
wlad13 [49]

Answer:

T(n)=n(n+1)/2

Explanation:

See the attached picture for detailed explanation.

6 0
3 years ago
Other questions:
  • Given the following adjacency matrix, what is the approximate rank vector after one iteration of the power iteration method (use
    10·1 answer
  • What is the name of the option in most presentation applications with which you can modify slide elements?
    14·1 answer
  • A network using multiple cell towers falls under which type of network?
    13·1 answer
  • Why is it important to begin development of a software solution with a programming design in place? A programming design summari
    11·2 answers
  • What is the post condition of an expression or variable
    11·1 answer
  • Nested if-else structures can contain many blocks of code. How many of those blocks of code might be executed?
    14·1 answer
  • What is a disadvantage of using transitions in a PowerPoint presentation?
    9·1 answer
  • Which value can be entered to cause the following code segment to display the message "That number is acceptable."? ____.
    15·1 answer
  • What are the characteristics of calendar sharing options in Outlook 2016? Check all that apply.
    13·2 answers
  • What types of printed information are useful to obtain from your target employers?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!