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
You want to securely erase data from your hard drive what can you use to do this and what is the process called
tankabanditka [31]
You could Factory Reset a computer or you could smash it with  a hammer
7 0
3 years ago
Read 2 more answers
I analyze data, as a consultant, for companies making important business decisions. In order to get my point across, which of th
ladessa [460]

Answer:

3

Explanation:

I've just taken the test and made a 100. 3 is the most logical answer aswell, it has more of an effect than the others.

4 0
3 years ago
According to the video, which of the following is communication between two individuals? Intrapersonal Communication Public Spea
DedPeter [7]

Answer:

The Last option: Dyadic Communication AND Interpersonal Communication

is the correct one.

Explanation:

Communication can be defined as the process in which one may convey his thoughts or inquires about things.

There are many types of communications as listed above.

  • Intrapersonal Communication
  • Interpersonal Communication
  • Dyadic Communication
  • Small Group Communication
  • Public Communication
  • Mass Communication
  • Organizational Communication
  • Intercultural Communication.

Under all these, Interpersonal communication and Dyadic communication are the ones that are between two people.

Dyadic communication is the one in which two people relate to exchange thoughts and ideas face-to-face. It is sometimes referred as dialogic relation.

Interpersonal relation can be between two or more than  two persons that may know each other. It is clearly specified in this communication that who listener and speaker are.

<h3>I hope it will help you!</h3>
3 0
3 years ago
Read 2 more answers
A restaurant chain has several store locations in a city (with a name and zip code stored for each), and each is managed by one
bazaltina [42]

Answer:

The restaurant chain system consist of restaurant id, name, zipcode, manager id, menu list.

Manager; manager id, name, phone no, and store.

Menu; menu id, type, items and description.

Items; item id, price and description.

Explanation:

Please look at the attachment for the E. R diagram.

5 0
3 years ago
A print server uses a print ________ as a software holding area for jobs waiting to be printed.
vichka [17]

Answer:

spooler

Explanation:

A print server uses a print spooler as a software holding area for jobs waiting to be printed.

8 0
2 years ago
Read 2 more answers
Other questions:
  • What is the typical relationship between time and interest rate?
    12·1 answer
  • In JavaScript, which of the statements below can be used for string declaration?
    11·1 answer
  • Why are cable networks such as mtv and cnn more profitable than the big four broadcast networks?
    8·1 answer
  • Select the correct answer. Larry finds it easy to run legacy programs and applications in a virtualized environment. How does th
    5·1 answer
  • What is a special type of variable used in subroutines that refers to a piece of data?
    15·1 answer
  • A _________________ operating system accepts random enquires from remote locations and provides an instantaneous response
    5·1 answer
  • Some programmers include scroll bars, title bars, buttons, and menus in a program simply by adding them to a layout through a pr
    10·1 answer
  • Vadik is creating a program where the user inputs their grade level and the program tells them which sports teams they are allow
    9·2 answers
  • ¿Qué son las tecnologías modernas?
    6·1 answer
  • What is one of four key principles of Responsible Artificial Intelligence
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!