Respuesta :
Answer:
import java.util.Scanner;
public class num1 {
public static void outputMinutesAsHours(double origMinutes) {
double hours = origMinutes / 60;
System.out.println("The converted hours is " + hours);
}
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
double minutes;
minutes = scnr.nextDouble();
outputMinutesAsHours(minutes); // Will be run with 210.0, 3600.0,
System.out.println("");
}
}
Explanation:
The question required us to only write the statement to complete the line
outputMinutesAsHours(double origMinutes) { /* Your solution goes here */ }
The solution double hours = origMinutes / 60; solves this because there are 60 minutes in one hour, so to conver minutes to hours, you divide the number of minutes by 60
Methods in Java, are blocks of code that function as one.
The complete method definition, where comments are used to explain each line is as follows:
//This defines the void method
public static void outputMinutesAsHours(double origMinutes) {
//This converts the time to hours
double hours = origMinutes / 60;
//This prints the converted time (in hours)
System.out.println(hours);
}
At the end of the program, the converted time is printed.
Read more about similar programs at:
https://brainly.com/question/11370067