Respuesta :

A Java method is a collection of statements that are grouped together to perform an operation. In this  program I will use the java programming language for sort out the solution of given problem.

Solution

Public class HourToMinConv {

Public void outputMinutesAsHours (double origMinutes) {

Double minutesInHour = 60.0;

System.out.println (origMinutes / minutesInHour);

}

Public static void main (String [] args) {

HourToMinConv timeConv = new HourToMinConv ();

// test by running with 210.0, 3600.0, and 0.0.

timeConv.outputMinutesAsHours (210.0);

System.out.println ("");

}

}

Learn more:

  • Write an expression to print each price in stock_prices. sample output for the given program: $ 34.62 $ 76.30 $ 85.05

        brainly.com/question/9083134

Keywords: Java method, programming, HourToMinConv

To convert the minutes into hours, first define a class HourToMinConv and within the class define a function that will take number of minutes as  argument.

Now, within the function initialize a variable name 'minutesInHour' with the value 60 since 1 hour is equal to 60 minutes. Now, convert the minute values into hours by using timeConv() function. The collection of statement written in Java language to convert the minutes into hours is written below.

Further explanation:

Code:

The below Java code converts the number of minutes into hours.

//Define the  class

public class HourToMinConv {

   public void outputMinutesAsHours(double origMinutes) {

//Initialize the variable

   double minutesInHour = 60.0;

//Convert the minutes value into hours and print

       System.out.print(origMinutes / minutesInHour);

   }

//main body

   public static void main (String [] args) {

       HourToMinConv timeConv = new HourToMinConv();

       // Test by running with 210.0 minutes.

       timeConv.outputMinutesAsHours(210.0);

       System.out.println("");

  }

}

Output:

$javac HourToMinConv.java

$java -Xmx128M -Xms16M HourToMinConv

3.5

Learn more:

1. How does coding work on computers?  brainly.com/question/2257971

2. Prediction accuracy of a neural network depends on _______________ and ______________. brainly.com/question/10599832  

Answer details:

Grade: College Engineering

Subject: Computer Science

Chapter: Java Programming

Keyword:

Java,  programming, statements,  char, int, variables, file, loop, , array, size, variable, display, minutes, hours, main, void, class,code, public, double,void, print, input, output, sample, method, main, constructor,system

ACCESS MORE