I don't get any errors but would like an expert's view. Thank you in advanced.

One way to measure the amount of energy that is expended during exercise is to

use metabolic equivalents (MET). Here are some METS for various activities:

Running 6 MPH: 10 METS

Basketball: 8 METS

Sleeping: 1 MET

The number of calories burned per minute may be estimated using the following

formula:

Calories/Minute = 0.0175 * MET * Weight in kilograms

Write a program that calculates and outputs the total number of calories burned

for a 150-pound person who runs 6 MPH for 30 minutes, plays basketball for

30 minutes, and then sleeps for 6 hours. One kilogram is equal to 2.2 pounds.

private static void Q1() { int runningMET = 10; //Defined values in txt book int bBallMET = 8; //Defined values in txt book int sleepingMET = 1; //Defined values in txt book double weight = 150/2.2; //Converting pounds into Kilo. double constFactor = 0.0175; double calRun = calcMet(constFactor, runningMET, weight, 30); double calBball = calcMet(constFactor, bBallMET, weight, 30); double calSleep = calcMet(constFactor, sleepingMET, weight, 6*60); System.out.println("Question 1 Solution"); System.out.println("Total cals burned " + (calRun + calBball + calSleep)); System.out.println(); } private static double calcMet(double constFactor, int MET, double weight, int time) { return constFactor * MET * weight * time; }

The output for this program is:

Question 1 Solution

Total cals burned 1073.8636363636363