Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For this assignment, you will create a Java program that will evaluate a person's health. The program will ask the user for their waist measurement
For this assignment, you will create a Java program that will evaluate a person's health. The program will ask the user for their waist measurement (in inches), height measurement (in feet and inches), gender and number of minutes of exercise they get in a typical week. After evaluating, the program will print the user's waist measurement (in inches), height measurement (in inches), gender, waist to height ratio (as a percentage, rounded to 2 decimal places), a ratio message and the total number of minutes of exercise they get in a typical week onto the screen. tems will be displayed, as shown below (remember to use -, where appropriate). Example output is shown below in red (note: the output shown below is an example, your values will be different). Before asking for the user's waist measurement and, again, before printing the user's measurements, you will print 2 lines containing 50 asterisks per line (you must use a nested for loop to complete this task) The ratio message that will be displayed is dependent upon the indicated gender and waist to height ratio, as shown below Gender Female Waist to Height Ratio Under 42% 42% to 48% 48.01% to 57% Over 57% Under 43% 43% to 52% 52.01% to 62% Over 62% Ratio Message You are considered underweight. You are at a healthy weight! You are considered overweight. You are considered obese You are considered underwei You are at a healthy weight! You are considered overweight. You are considered obese Male This program must make use of a nested if/else statement and loops. This program will make use of 7 methods. The first method will be used to print the lines of asterisks onto the screen. The second method will be used to ask for the waist measurement (in inches). The third method will be used to ask for the height measurement (in feet and inches) and convert this height to total inches (remember, a method can return only a single value). The fourth method will be used to ask for the user's gender. The fifth method will be used to ask for the typical number of minutes of exercise the user gets each day of the week; this method will perform a cumulative algorithm to calculate the total number of minutes of exercise that the user gets in a typical week. The sixth methood will be used to calculate the waist to height ratio. The seventh method will be used to print the user's information (i.e., waist measurement, height measurement, gender, waist to height ratio, ratio message and total number of minutes of exercise in a typical week), as described above. Several of these methods will make use of parameters. At least 3 of these methods will return a value Program output should appear exactly as shown below. User input is in blue
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started