Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help writing this code in Java. Here is what the output should look like. Program (10 pts) Write a program that creates and

I need help writing this code in Java.

image text in transcribed

Here is what the output should look like.

image text in transcribed

Program (10 pts) Write a program that creates and manipulates two-dimensional arrays, according to the following specifications (refer to the notes, ARRAYS C, as needed) Write a static method with no return value called print2DArray, which takes an array of type intl as a parameter. The method should print the array to the screen one row per line, starting with row 0, with one space between elements. The method should work for any size array (see your notes for hints) You should test your print2DArray method by creating a couple of 2D arrays of different sizes (default 0 values are fine), calling your method, and making sure the output is the appropriate grid of values (zeroes for now, to keep it simple) After you've tested and verified your print2DArray method, write code in your main method to accomplish the following tasks: 1. 2. 3. 4. 5. Create a new 2D array with 5 rows and 10 columns. Populate the array with random 2-digit integers. Print the array using your print2DArray method. Now, change the four "corner" elements of your array to zeroes (see Sample Output) Print the array again Sample Output: Output -Lab6F 18 (run) x Original array 75 78 77 87 94 97 45 49 20 37 59 27 33 97 43 10 14 1 11 88 21 63 S 78 51 13 33 11 12 12 09 58 87 29 97 33 64 72 27 79 95 24 67 54 70 63 30 97 70 95 Hodified version: 0 78 77 87 94 97 45 49 20 0 59 27 33 97 43 10 14 1 11 88 21 63 96 78 91 13 33 11 12 12 89 58 87 29 97 33 64 72 27 79 0 24 67 54 70 63 30 97 70 0 BUILD SUCCESSEUL (total time: 0 seconds)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions