subject

This assignment is to teach the creation and processing of 2-dimensional int arrays. Assume that "intar" is a 2-dimensional int array (made out of rows and columns as in pages 289-321), which contains the following int values:

10 13 26 34 60 90
25 46 57 88 77 91
29 30 41 52 82 92
Write a java program that you will call Assign8.java that has a main method and declares:

The above two-dimensional array intar properly as is.(5 points)

A method printArrayAsIs() which has no parameter and returns nothing and is implemented as follows:
public static void printArrayAsIs(){}
Use a nested for loop (two consecutive for loops) to print the 2 dimensional array intar declared above in the exact following order (use the nested for loop in page 291 as an example) (10 points):
10 13 26 34 60 90 25 46 57 88 77 91 29 30 41 52 82 92
printArrayAsIs() is called from main(). (10 points)

A method printArrayColumnWise() which has not parameter and returns nothing and is implemented as follows:
public static void printArrayColumnWise(){}
uses a nested for loop( two consecutive for loops) to print the 2 dimensional array intar declared above in the exact following order (use the nested for loop in page 291 as an example) (25 points):
10 25 29 13 46 30 26 57 41 34 88 52 60 77 82 90 91 92
That is: to print the values of intar going across the columns instead of across the rows.
printArrayColumnWise() is called from the main() method. (10 points)

A method sumDifference() which has no parameter and returns nothing and is implemented as follows:
public static void sumDifference(){}
uses a nested for loop( two consecutive for loops) to print the sum of the elements of intar declared above in the exact following order (use the nested for loop in page 291 as an example) (30 points):
10 - 13 + 26 - 34 + 60 - 90 + 25 - 46 + 57- 88 + 77- 91 + 29 - 30 + 41 - 52 + 82 - 92
That is: to print the final result of the sum of elements as calculated above = -129
sumDifference() is called from the main() method. (10 points)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
This first part of the film shows the early history of motion pictures. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theatre productions? explain. in the scene where don is going to the party (starting at time code 14: 51), we see a street scene as he first rides with cosmo and then with kathy. what aspects did the filmmaker include to make the scene look and feel like don, cosmo, and kathy are riding in a car on a street? think about elements such as scenery, sound, props, lighting, and so on. a "talkie" picture is shown starting around time code 21: 15. how does the audience in the film react to the "talkie"? what influence do audiences have on film and theatre performances? how do film and theatre actors influence audiences? in the musical scene with cosmo (starting at time code 27: 00), how does the actor use props? what is the result? do you think the use of props effectively fulfilled the artistic vision for this musical number? why or why not?
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
Write a function named printfloatrepresentation(float number) that will print the floating point representation of a number using the format given below. (sign bit) exponent in binary (assumed bit).significandfor example if the number passed an argument is 71 yourprogram should print (0) 10000101 (1).00011100000000000000000similarly if the number passed to the function as argument is -71 the program should print (1) 10000101 (1).00011100000000000000000
Answers: 3
question
Computers and Technology, 23.06.2019 07:00
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
You know the right answer?
This assignment is to teach the creation and processing of 2-dimensional int arrays. Assume that "i...
Questions
question
Social Studies, 02.10.2021 19:10
question
English, 02.10.2021 19:10
question
Mathematics, 02.10.2021 19:10
question
Mathematics, 02.10.2021 19:10
Questions on the website: 13722367