Question: Language:java Question 3: Write a program to read integers N1 and N2 from the input file input4_03.txt. Create an array of N1 integers where each

Language:java

Question 3: Write a program to read integers N1 and N2 from the input file input4_03.txt. Create an array of N1 integers where each integer is a random number in the range [1, N2] inclusively. Write a method for each of the following items and then print the results to the output file output4_03.txt a. All elements in the array (method name: printAllElements(), input parameter: input array)

b. All odd numbers in the array (method name: printAllOdds(), input parameter: input array)

c. All even numbers in the array (method name: printAllEvens(), input parameter: input array)

d. The Maximum number(s) of the array (method name: printAllMaxs(), input parameter: input array)

e. The Minimum number(s) of the array (method name: printAllMins(), input parameter: input array)

f. The average of the array (method name: printAverage(), input parameter: input array)

g. All prime numbers in the array (method name: printAllPrimes(), input parameter: input array)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!