Question: Working with Java, NetBeans IDE 8.2 Q1: Write a method called testArray that accepts a one-dimensional array of any size and prints the following summary
Working with Java, NetBeans IDE 8.2
Q1: Write a method called testArray that accepts a one-dimensional array of any size and prints the following summary information: a) all array elements at an even index b) every fifth element c) all elements but the first and last Write a program that demonstrates this method by using an array of 20 random integers from 100 to 200.
Q2: Write a method called displayGrid that accepts a two-dimensional array of integer values from 0 to 99 and prints this array an evenly spaced set of rows and columns. Write a program that demonstrates this method by using 6 row by 4 column array of random integers from 0 to 99.
Q3: Edit your displayGrid method so that it accepts a two-dimensional array of double values and a threshold value and displays a two-dimensional grid of only those values that are greater than the given threshold. Any values not over this threshold should be printed as spaces. Write a program that demonstrates this method by using 6 row by 4 column array of random integers from 0 to 99. For example, display only elements with a value greater than the 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
