Class: DoubleMethod
Write a method using the header below
public static double readDouble(String prompt)
that displays the prompt string, followed by a space, then reads a floating-point number from the user, and returns it. Here is a typical usage:
salary = readDouble("Please enter your salary:");percentageRaise = readDouble("What percentage raise would you like?");Write a test program to test the method.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here