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
Gemiola [76]
2 years ago
5

In java I need help on this specific code for this lab.

Computers and Technology
1 answer:
rosijanka [135]2 years ago
8 0

Answer:

Explanation:

The following code is written in Java and creates the two methods as requested each returning the desired double[] array with the averages. Both have been tested as seen in the example below and output the correct output as per the example in the question. they simply need to be added to whatever code you want.

public static double[] rowAvg(int[][] array) {

       double result[] = new double[array.length];

     for (int x = 0; x < array.length; x++) {

         double average = 0;

         for (int y = 0; y < array[x].length; y++) {

             average += array[x][y];

         }

         average = average / array[x].length;

         result[x] = average;

     }

     return result;

   }

   public static double[] colAvg(int[][] array) {

       double result[] = new double[array[0].length];

       for (int x = 0; x < array[x].length; x++) {

           double average = 0;

           for (int y = 0; y < array.length; y++) {

               average += array[y][x];

           }

           average = average / array.length;

           result[x] = average;

       }

 

       return result;

   }

You might be interested in
I need an answer and fast What happens if a sequence is out of order?
horsena [70]

Answer:

i would say A

hope i helped <3

Explanation:

4 0
3 years ago
Read 2 more answers
Can someone please help me...pls.. how do u delete an account on this app(brainly)..pls help fast​
Basile [38]

Explanation:

The option to delete your account can be found in your Profile Settings under Privacy. Click on the box labeled I want to delete my account, and the request will be sent for the account to be deleted.

6 0
3 years ago
Read 2 more answers
What are barcode and rfid tags ​
Solnce55 [7]

Answer:

They are both ways to identify assets (e.g., persons, animals, objects).

Explanation:

A barcode is a bit of information (usually a number) printed as a line or block pattern on a surface (e.g., a sticker).

An RFID is a bit of computer memory with an antenna.

Both can be read with the appropriate scanner device.

7 0
3 years ago
Read 2 more answers
What are vertical sets of cells called
Nady [450]
A vertical group of cells are called (C) column
6 0
3 years ago
Read 2 more answers
True or false? LearnSmart (the "smart flash card assignments") really gets your competitive spirit in gear by allowing you to se
vfiekz [6]
<h2>Answer:</h2>

The following statement is TRUE.

LearnSmart (the "smart flash card assignments") really gets your competitive spirit in gear by allowing you to see where you stand as compared to your classmates in terms of your mastery of grammar and vocabulary concepts.

<h2>Explanation:</h2>

LearnSmart is an adaptive technology that is helping a lot of students by letting them judge which parts/topics of the book are not clearly learnt by them and which of them are under their grip.

LearnSmart provides cards with short term questions that make i possible for students to complete their preparation in short time. In addition to this smart flash card assignments are a to compare students preparation relatively.

<h3>I hope it will help you!</h3>
4 0
3 years ago
Other questions:
  • As yall know its spoopy season. This means spoopy music! I am having a live stream on the Spoon app under the username teendrago
    11·1 answer
  • Your client expresses that they want their new website to have a responsivedesign with consistent coding. They are concerned wit
    5·1 answer
  • _____ view focuses on the text and content of a document, without much information on the page layout
    15·1 answer
  • Which of the following TCP/IP settings should be configured to specify DNS suffixes to use other than resolving names through a
    9·1 answer
  • If there is a circuit that is being used 36 CCS then how much of that circuit is being used in Erlang?
    8·1 answer
  • How can volunteering yo help plan fundraiser for your team or club be a way to develop your strengths?
    13·1 answer
  • A growling noise is heard only when the driver exerts force on the clutch pedal. No noise is heard when the clutch pedal is up.
    14·1 answer
  • If the computer has an encrypted drive, a ____ acquisition is done if the password or passphrase is available. a. passive b. sta
    8·1 answer
  • Someone please help ASAP will brainlist
    9·2 answers
  • The features used be of Computer that tell, it every field.​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!