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]
3 years ago
5

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

Computers and Technology
1 answer:
rosijanka [135]3 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
Rainbow six siege imi da ecran negru.Ce sa fac?
Oduvanchick [21]
Mmmmmmmm check the internet
7 0
3 years ago
Jason attempts to hack into a banking site to steal customer information. He finds the security of the Web site lacking and is a
r-ruslan [8.4K]

Answer:

honey pot

Explanation:

Jason attempts to hack into a banking site to steal customer information. He finds the security of the Web site lacking and is able to access the site with ease. Jason is arrested the next day and charged with computer crime. The banking site was able to track​ Jason's IP address because he had unknowingly attacked a honey pot.

8 0
3 years ago
EASY What does the Backspace key do?
arsen [322]

Answer:

Removes characters behind (or to the left of) the insertion point.

Explanation:

5 0
3 years ago
Determine the "answer" to the function according to the spreadsheet below: =SUM(A1:A3)/2
nataly862011 [7]
If this is the full question " <span>Which of the following formulas is equivalent to =SUM(A1:A3)? A. =A1+A3 B. =A1+A2+A3 B. =A2 D. =A3-A1"


The answer is </span>
<span>B. =A1+A2+A3 formulas is equivalent to =SUM(A1:A3)</span>
4 0
4 years ago
Suppose that you have a computer with a memory unit of 24 bits per word. In this
Maru [420]

Answer:

a )   The amount of bits required for the opcode

 8 bits

2^8=  256        

 256>198

 We get the next lower number, which is 2^7 = 128 bits, because it is greater than 198. As a result, the operation code necessitates 8 bits.

b)   The number of bits reserved for the instruction's address.

 16 bits

 24-8  =  16

c)  

 65536

2^16  =  65536

 Maximum number =  65535

  2^15 = 32768-1

 =  32767

Explanation:

4 0
2 years ago
Other questions:
  • Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follo
    13·1 answer
  • True or False. A modern programming EXE provides a text editor, a file manager, a compiler, a linker and loader, and tools for d
    9·1 answer
  • Typically, the first item in defining a function is _____. (Points : 4)
    6·1 answer
  • When you use the Query Editor to run a query that returns an xml type, theManagement Studio displays the XML data in blue with u
    13·1 answer
  • Please answer that and i'll gave you branlliest
    15·1 answer
  • Choose all of the items that represent parts of an operating system.
    6·2 answers
  • Dwayne wants a variable called "name" to appear in the interpreter and does not want a space after it. Which of these should be
    11·1 answer
  • Why is my Brainly scanner not work​
    5·2 answers
  • How many Horizontal and Vertical Rods are there in Abacus
    15·2 answers
  • Identify the two top benefits of using angel investors to start a business.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!