Question: Help in Java: Write a method named bodyFat that calculates and returns true if the body fat percentage is 20 or more, otherwise, return false.

Help in Java:

Write a method named bodyFat that calculates and returns true if the body fat percentage is 20 or more, otherwise, return false. Use the header: public static boolean getBFT(String gender). The method accepts gender (male, female) as its parameter. Ask for all pertinent information based on the given gender inside the method. Body fat for women can be calculated using the following simple formulas: Body fat formula for women: A1 = (weight * .732) + 8.987 A2 = wrist measurement / 3.14 A3 = waist measurement * .157 A4 = hip measurement * .249 A5 = forearm measurement * .434 B = A1 + A2 - A3 A4 + A5 Body fat = weight B Body fat percentage = Body fat * 100 / weight Body fat formula for men: A1 = (weight * 1.082) + 94.42 A2 = waist measurement * 4.15 B = A1 A2 Body fat = weight B Body fat percentage = Body fat * 100 / weight

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!