1 . Write a Java program using the following methods: A method to fill the array with...
Fantastic news! We've Found the answer you've been seeking!
Question:
1. Write a Java program using the following methods:
- A method to fill the array with random numbers: the elements of the array should be random integers between 0 and 100 (declared as class constants).
- A method to print the elements of the array in a table like format (6 elements/line - declared as a class constant)
- A method to find the maximum element in the array
- A method to find the minimum element in the array
Have the size of the array declared as a class constant (30). The methods should take as input parameters the array and its size. The method to print should add one more parameter for the number of elements on each line. Write a program to call these methods and display the difference between the maximum and the minimum element in the array as following.
Related Book For
Posted Date: