Question: The third pic is the starting code, I just need to finish it. We want to find the average of three positive numbers (doubles). Consider

 The third pic is the starting code, I just need to
finish it. We want to find the average of three positive numbers
(doubles). Consider the following class (which is not complete) Program finds theThe third pic is the starting code, I just need to finish it.

We want to find the average of three positive numbers (doubles). Consider the following class (which is not complete) Program finds the minimum of import java.util.scanner public class Labs itive numbers find the minimum of three numbers public static void main(String args) f Scanner input new Scanner (System.in)i double one / first number double two /I second number double three // third number System.out. Enter a positive number or type Q to terminate")i while (true) one, getInput (input remaining inputs and is Write code to get negative tered Write code to display the minimum the three il floating-point numbers / /end while // end main // the minimum method determines the smallest of three numbers /1 complete the header for the minimum method /1 that takes three double parameters and returns a double public static ktypo> minimum() code to compute and return the minimum of three numbers ) // end method minimum /l the gotInput method prompts the user for input and /l returns a number entered by the user or -1 if a negative number // or if something else is entered. public static double getInput (Scanner input) // Add code to prompt and return the user's input l end method getInput Complete the getInput method to prompt the user and return the user's input or a -1 if he enters something other than a number Add the appropriate code in the while loop to input the remainder of the input data using the getinput method or exiting the program whenever a negative value is returned 1. 2

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!