Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use Java Ecplise. (2D array + method) Write a Java program to meet the following requirements: 1. In your main method, you should Declare a

image text in transcribed

Use Java Ecplise.

(2D array + method) Write a Java program to meet the following requirements: 1. In your main method, you should Declare a 2-Dragged array with the values as below. int[][] matrix = {{11},{20,30}, {40,50,60}}; Invoke three methods below which will print out all array elements and the sum, average of all array elements. (Do not hardcode the output/return value of the method, the output/return value should depend on the method's input parameter). 2. Write a method that will take an integer 2-D array as the input and print each element of the input 2-D array. The numbers should be aligned as below. Array 11 20 30 40 50 60 3. Write a sum method that will take an integer 2-D array as the input and return the sum of all array elements. example output: 4. Write an avg method that will take an integer 2-D array as the input and return the average (date type: double) of all array elements. 5. The following output is an example of your final output: Array 11 20 30 40 50 60 Sum: 211 Average: 35.17 6. This Program assignment does not take any input from the keyboard

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

Students also viewed these Databases questions

Question

5. Do you have any foreign language proficiency?

Answered: 1 week ago