Question: Assignment 1 expects you to write a simple Java program along the line of those modeled for you in Chapter 1 of the text: Your
Assignment 1 expects you to write a simple Java program along the line of those modeled for you in Chapter 1 of the text:
- Your source code should compile.
- You should have a single Java class that contains a main method.
- Your program must meets specifications of the problem. (Dont solve a different problem than what was asked.)
- Sequential logic is all that is required for these problem choices.
- The computations made by the program must be correct.
- Program test runs must have correct output.
- Your program should follow appropriate Java programming style so that it is humanly readable.
- Names (Identifiers) adhere to Java programming conventions.
- Variables and constants have meaningful names and the appropriate data type.
- You should make use of at least one symbolic constant in your program.
- For this program, there is no input required and values of variables should be assigned within the program code. Interactive input will be required in future assignments.
Question-
One way to measure the amount of energy that is expended during exercise is to use metabolic equivalents (METS). 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 formula:
Calories/Minute = 0.0175 * METS *Weight(Kg)
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.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
