Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given a person’s height (in feet and inches) and weight (in pounds and ounces),

ID: 3870080 • Letter: G

Question

Given a person’s height (in feet and inches) and weight (in pounds and ounces), and then reporting the BMI index (along with the chart listing the body type categories using ). The original formula was devised using the metric system of measurement. Therefore, since the application is being developed for user in the U.S., the input data will have to be converted from the English system. After calculating the index you also need to print the body type of the person using conditional statement.

BMI can be calculated using the following formula: BMI = w / h^2
where: w = weight (in kilograms) h = height (in meters)
kilograms = pounds / 2.2 16 ounces = 1 pound meters = feet * 0.3048 12 inches = 1 foot

BMI Categories:
Underweight = <18.5
Normal weight = 18.5–24.9
Overweight = 25–29.9
Obesity = BMI of 30 or greater

The Question using the above: Determine the overall procedure that the software system must perform and list this procedure out in the form of pseudocode. This includes what information is known prior to the start of the system; what information must be acquired once the system is placed into operation; what are the detailed operations that must be performed during calculations and data processing; and what information must be provided as part of the system output. Once completed, place the generated pseudocode in the source code file header and use it as a guide for implementing application. Please make sure you put the pseudocode under comments.

Explanation / Answer

We need to know the height and weight of the person prior to the start of the system.Once the data of height and weight are provided then we can easily convert the weight which is given in pounds to kilograms and height which is given in feet to metres. After converting these into the prescribed units we will find the BMI index using the formula BMI= w / h^2 where w is weight in kilograms and h is height in metres. The output will calculated based on the given formula with double as datatype. When the BMI is less than 18.5 then the person is considered as "Underweight", when BMI is in range of [18.5 , 24.9] then the person is considered as "Normal Weight", when BMI is more than or equal to 30 then person is considered as obesity.

The pseudo code is as follows

/* input weight and height

double weight , height;

double bmi;

weight=weight / 2.216;

height= height * 03048;

bmi=weoght / height^2;

if(bmi < 18.5) print"Underweight";

else if(bmi >= 18.5 && bmi <=24.9) print "Normal Weight";

else if(bmi >= 25 && bmi <= 29.9) print "Overweight";

else print"Obesity";

*/

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote