Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Database And Expert Systems Applications Dexa 2023 Workshops 34th International Conference Dexa 2023 Penang Malaysia August 28 30 2023 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Maqbool Khan

1st Edition

303139688X, 978-3031396885

More Books

Students also viewed these Databases questions