Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a method called create2DIntArray that creates a two-dimensional array of integers between 0 and 10. The array should have r rows and c columns.

Write a method called create2DIntArray that creates a two-dimensional array of integers between 0 and 10. The array should have r rows and c columns. Both r and c are passed to the method. The method should return the address of the array that it creates.

Write a method called print2DIntArray that nicely prints the contents of a two-dimensional array of integers. The address of the array should be passed to the method.

Write a method called sumOfRowIn2DIntArray that returns the sum of the values in row r in a two-dimensional where, r is passed to the method along with the address of the two-dimensional array.

Write a method called sumOfColumnIn2DIntArray that returns the sum of the values in column c in a two-dimensional, where c is passed to the method along with the address of the two-dimensional array.

Write a method called sumOfRightDiagonalIn2DIntArray that returns the sum of the values in the right-leaning diagonal in a two-dimensional. The address of the two-dimensional array will need to be passed to the method, of course.

Write a method called sumOfLeftDiagonalIn2DIntArray that returns the sum of the values in the left-leaning diagonal in a two-dimensional. The address of the two-dimensional array will need to be passed to the method, of course.

[Extra Credit] Write a method called sumOfNeighborsIn2DIntArray that returns the sum of the values that are next to the value in row r, column c. Both r and c are passed to the method along with the array of course.

In my java programming class, How would i go about doing this by just using arrays and loops

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_2

Step: 3

blur-text-image_3

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

Expert Performance Indexing In SQL Server

Authors: Jason Strate, Grant Fritchey

2nd Edition

1484211189, 9781484211182

More Books

Students also viewed these Databases questions

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago