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
Windows displays a(n)
pochemuha

Answer:

system I hope tis is right

7 0
3 years ago
Imaging a computer is part of what phase of conversion?
grandymaker [24]
B. Because the computer can rearrange itself when it is in a phase of conversion
5 0
3 years ago
A __________ is a repository of data gathered from operational data and other sources that is designed to serve a particular com
VMariaS [17]
Data Mart is a smaller amount of data that is collected from a data warehouse.
8 0
3 years ago
A hot site consists of computers, devices, and connectivity necessary to rebuild a network exist, but without appropriate config
andreyandreev [35.5K]

Answer:

False.

Explanation:

Hot site :- It is a backup service it is always working it allows a enterprise to continue  it's computer and network operations in case of a equipment or computer disaster. A hot site contains all the equipment required for the business to continue it's working, including space for office,furniture, telephone jacks and computer equipment with appropriate configuration.

4 0
3 years ago
How many integer types are there in python​
Setler79 [48]
In python you can have several types of numbers such as plain integers, long integers, floating-point numbers and complex numbers.
5 0
3 years ago
Other questions:
  • After doing the route tracing to a particular IP addresses, paste the path of IP addresses that were taken from your IP address
    13·1 answer
  • . Electricians will sometimes call ______ "disconnects" or a "disconnecting means."
    12·1 answer
  • the task is to ask the user for three numbers and find the average which pseudocode gives you the comment outline for task​
    10·1 answer
  • Write a program that prompts the user to enter an equation in the form of 10 5, or 10-5, or 1*5, or 13/4, or 13%4. The program s
    6·1 answer
  • Ophelia is entering a Get Fit! sporting goods store in a shopping mall when her heel gets caught in a heating grate at the thres
    9·1 answer
  • Which expression correctly determines that String s1 comes before String s2 in lexicographical order
    6·1 answer
  • Which option identifies the two natural wind patterns that move air masses in the United States?
    5·2 answers
  • In many DBMSs where no strict separation of levels is maintained, this one language is used by the DBA and database designers to
    13·1 answer
  • The aim of this activity is to implement an algorithm that returns the union of elements in a collection. Although working with
    6·1 answer
  • The ________ is specifically designed for situations requiring a counter variable to control the number of times a loop iterates
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!