Question: Need some help asap!!! Thanks and please use java and scanner and an array! :) Write a Java program, YourLastName.java: o In main method: 1)
Need some help asap!!! Thanks and please use java and scanner and an array! :)
Write a Java program, YourLastName.java:
o In main method:
1) Print out your first name, last name and last 4 digits of your panther number (i.e. John Smith 4312)
2a) Create 2-D array, say m:
2b) Assuming the last digit of your panther number is N (N is 2 as the last digit), set N+6, as the row size of array m
2c) Ask the user to input column size for array m from the keyboard (use scanner)
2d) Fill all array elements as double numbers in the range of (6.0 , 16.0) by using of Random object
3) Create another 2-D array, say double[][]mc={{1,1,1},{2,0,1},{3,6,3}};
4a) Pass the above array m and mc, to call the following two methods:
4b)-MinCol(m);
4c)-MinCol(mc);
4d)-System.out.println (the average of array m is: + returnLast2RowAvg(m));
4e)-System.out.println (the average of array mc is: + returnLast2RowAvg(mc));
5) Print out the smallest column sum, and the average of last 2 rows of array m and mc
-------------------------------------------------------------------------------------------------------------------------------
Next methods
In MinCol(double[][] array) method, find and print the smallest column sum in the array
In returnLast2RowAvg (double[][] array) method, find the average of the elements in last 2 rows in the array and return this average value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
