Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in java ASAP please(the first one took too much time and to answer until now) Home Exercise : Write a java program to do the
in java ASAP please(the first one took too much time and to answer until now)
Home Exercise : Write a java program to do the following: a. Declare a 2D- array named mat of type double and size 2 X 3 and b. Prompt the user to input the array elements from keyboard. c. Call the following methods : 1. Method AVG to find and return the average of the array. 2. Method SumRow to calculate and display the sum of each rows. 3. Method ADD to ask the user to input a double number n and add it to each element in the array, Sample output: Output - Array (run) * run: DD Enter the array elements: ROW 0: 10 20 30 ROW 1: 40 50 60 The average of the array elements: 210.0 The sum of row 0 : 60 The sum of row 1 : 150 Enter a number n to add it to the array: 5 The array elements after adding 5.0to each element: 15.0 25.0 35.0 45.0 55.0 65.0 BUILD SUCCESSFUL (total time: 18 seconds) 2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started