Computers and Technology

Create a new Java application called "Scorer" (without the quotation marks) that declares a two-dimensional array of doubles (call it scores) with three rows and three columns and that uses methods and loops as follows. Use a method containing a nested while loop to get the nine (3 x 3) doubles from the user at the command line.
Use a method containing a nested for loop to compute the average of the doubles in each row.
Use a method to output these three row averages to the command line.
Note
The requirement is to use a two-dimensional array of type double called ‘scores’ with 3 rows and 3 columns.
Two methods are required.
The first method prompts the user to enter 9 values and then stores them in the scores array. Using a nested loop (for or while) is required. As long as you use a nested loop of some type, that’s fine.
The second method calculates the row averages. My approach was to store the row averages in a separate 3-element array (declared in main and passed into the method as a parameter along with the scores array). Use a nested for loop for processing the rows and calculating the row averages.
The third method takes the 3-element array containing the row averages and uses a for loop to display each of the average values.
Here is an example run:
run:
Enter 9 numbers
Value 1: 10
Value 2: 20
Value 3: 30
Value 4: 40
Value 5: 50
Value 6: 60
Value 7: 70
Value 8: 80
Value 9: 90
The average of row 1 is 20.00
The average of row 2 is 50.00
The average of row 3 is 80.00

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:40, genyjoannerubiera
Kali, a python programmer, is using the turtle module to write the word “hello.” which code should she use to indicate the location to begin writing the word? a # pick up the turtle and move it to its starting location. b penup(-100, 200) goto() pendown() c penup() goto(-100, 200) pendown() d # pick up the turtle and move it to (-100, 200)
Answers: 2
image
Computers and Technology, 22.06.2019 15:20, brookemcelhaney
The north and south regions had very diferent economies in the 1800s.
Answers: 1
image
Computers and Technology, 23.06.2019 12:30, Prettygirlyaya
How is the brightness of oled of the diaplay is controled
Answers: 1
image
Computers and Technology, 24.06.2019 07:30, Isabellawuzhere
Aproject involves many computing systems working together on disjointed task towards a single goal what form of computing would the project be using
Answers: 3
Do you know the correct answer?
Create a new Java application called "Scorer" (without the quotation marks) that declares a two-dime...

Questions in other subjects: