Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions