Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3.18 LAB: Calories burned during workout (expressions) The following equations e

ID: 3744988 • Letter: 3

Question

3.18 LAB: Calories burned during workout (expressions) The following equations estimate the calories burned when exercising (source) Men Calories lAge x0 2017)- (weight x 0 09036)+ (Heart Rate x 0 6309)-550969x Time/4184 women calories-tAge x 0074)-(weight i O.05741) + (Heart Rate x O 4472-2040221 x Time / 4184 Write a program using inputs age tyears), weight (pounds), heart rate (beats per minute), and time (minutes) Output calories burned for men and women. Ex If the input is 49 155 148 60 the output is Men: 489.7772466539196 calories Wonen: 5B0.939531548751 alories LAD 0/10 ACTIMITY3 181 LAB: Calories burned during werkout: (expressions) LabProgram java Load defaut termplate.. Ingort Save tsi.scanner, Pblic cles LabProgran isn s Ti su Eelow tyne any needed pmit modeinpur valuels elak Run program and chserve Develop mode

Explanation / Answer

import java.util.Scanner; public class LabProgram { public static void main(String[] args) { Scanner in = new Scanner(System.in); double age = in.nextDouble(); double weight = in.nextDouble(); double rate = in.nextDouble(); double time = in.nextDouble(); double men = (age*0.2017 - weight*0.09036 + rate*0.6309 - 55.0969) * time / 4.184; double women = (age*0.074 - weight*0.05741 + rate*0.4472 - 20.4022) * time / 4.184; System.out.println("Men: " + men + " calories"); System.out.println("Women: " + women + " calories"); } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote