Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a new Java code. use your own code + words. write in first year very basic beginner level. Please write in very detail. 2-Dimensional
Write a new Java code. use your own code + words. write in first year very basic beginner level. Please write in very detail.
2-Dimensional Array Operations.
Use a Java class with a main method.
In this class (after the main method), define and implement the following methods:
- public static void printArray. This method accepts a two-dimensional double array as its argument and prints all the values of the array, separated by a comma, each row in a separate line.
- public static double getAverage. This method accepts a two-dimensional double array as its argument and returns the average of all the values in the array.
- public static double getRowTotal. This method accepts a two-dimensional double array as its first argument and an integer value as its second argument. The second argument is the subscript of a row in the array. The method returns the total of the values in the specified row.
- public static double getLowestInColumn. This method accepts a two-dimensional double array as its first argument and an integer value as its second argument. The second argument is the subscript of a column in the array. The method should return the lowest value in the specified column of the array.
In the main method create and initialize a 2-dimensional array of double numbers and test all the methods described above.
Step 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