Write a complete java program called scorer

Assignment Help JAVA Programming
Reference no: EM13865132

Use a nested for loop to compute the average of the rows in each double. The code below works to populate the 2D array however cannot yet compute and print the averages. 

TEXT QUESTION: Write a complete Java program called Scorer that declares a 2-dimensional array of doubles called scores with three rows and three columns. Use a nested while loop to get the nine (3 x 3) doubles from the user at the command line. Finally, use a nested for loop to compute the average of the doubles in each row and output these three averages to the command line.

public static void main(String[] args) {

Scanner userInput = new Scanner(System.in);

int row;

int col;

final int NUM_ROWS = 3;

final int NUM_COLS = 3;

 

// Score array 3x3 doubles

double [][] ScoringMatrix = new double [NUM_ROWS][NUM_COLS];

 

ScoringMatrix[0] = new double[3];

ScoringMatrix[1] = new double[3];

ScoringMatrix[2] = new double[3];

 

for(row = 0; row < NUM_ROWS; row++) {

      for(col = 0; col < NUM_COLS; col++) {

         System.out.println("Enter a double: ");

         ScoringMatrix[row][col] = userInput.nextDouble();

}}

for(row = 0; row < NUM_ROWS; row++) {

       for(col = 0; col < NUM_COLS; col++) {

       /* Need code to average the rows and print the results of the mean calc */

}}

System.out.println("");

return;

}

Reference no: EM13865132

Questions Cloud

Write a function called makemat that will receive two row : Write a function called makemat that will receive two row vectors as input arguments, and from them create and return a matrix with two rows.
Effect of the watchs destruction on the parties : Explain how UCC Art. 2 would apply to these facts from the perspectives of A, B, C and D in terms of The legal relationships between A and B, A and C, B and C, and C and D;
Determine the sources of credit available : Determine the sources of credit available (where can you get credit, advantages and disadvantages of the types).
The world benefit from the general imposition of controls : Would the world benefit from the general imposition of controls on the movement of international finance?
Write a complete java program called scorer : Write a complete Java program called Scorer that declares a 2-dimensional array of doubles called scores with three rows and three columns. Use a nested while loop to get the nine (3 x 3) doubles from the user at the command line. Finally, use a nest..
Describe in very general terms the as-is business process : Describe in very general terms the as-is business process for registering for courses at your university. Collaborate with another student in your course and evaluate the process using problem analysis and root cause analysis.
Spin questioning system : The ADAPT questioning system is similar to the SPIN questioning system in that
What about the non-traditional channels of monetary policy : What do you think about the non-traditional channels of monetary policy? Could you provide an example of a variable or set of variables that could show non-traditional channels of monetary policy? Describe and explain.
Explain the meaning of array index out of bounds : Explain the meaning of "array index out of bounds".

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd