Question: create a new Java application called MinMax (without the quotation marks) that declares an array of doubles of length 5, and uses methods to populate

create a new Java application called "MinMax" (without the quotation marks) that declares an array of doubles of length 5, and uses methods to populate the array with user input from the command line and to print out the max (highest) and min (lowest) values in the array.

Note

Use an array of type double with a length of 5 elements.

The use of at least three methods is required.

The first method prompts the user for 5 decimal values and reads the values into the array.

The second method has the filled array as a parameter and finds the minimum value in the array and returns that value to main.

The third method also has the filled array as a parameter and finds the maximum value in the array and returns that value to main.

Main prints out the minimum and maximum values.

An example run:

Enter 5 numbers

Value 1: 34.2

Value 2: -8.1

Value 3: 5

Value 4: 67.34

Value 5: 0

Min = -8.10 Max = 67.34

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!