Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / JAVA Complete the method definition to output the hours given minutes

JAVA Complete the method definition to output the hours given minutes

Computer Science

JAVA Complete the method definition to output the hours given minutes. Output for sample program: 3.5

         CODE below 

public class HourToMinConv {
public static void outputMinutesAsHours(double origMinutes) {

/* Your solution goes here */

}

public static void main (String [] args) {
outputMinutesAsHours(210.0); // Will be run with 210.0, 3600.0, and 0.0.
System.out.println("");
}
}

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

Sample output:

3.5
60.0
0.0

Code to Copy:

// Declare the class

public class HourToMinConv

{

// Method declaration

public static void outputMinutesAsHours(

double origMinutes)

{

// statement to display minutes.

System.out.println(origMinutes / 60);

}

// start the main method.

public static void main(String[] args)

{

// call to the method.

outputMinutesAsHours(210.0);

outputMinutesAsHours(3600.0);

outputMinutesAsHours(0.0);

System.out.println("");

}

}

please see the attached file for complete solution 

Related Questions