sample week 3 lab

sample week 3 lab - BMI Calculator displayWelcom eMessage...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: BMI Calculator displayTerminationMessage displayWelcom eMessage getI nput calculat eBMI displayOutput getCategor y Week 3: Sample Lab The body mass index (BMI) is a measure that is used to determine whether a person's weight is healthy for their height. The measure can be calculated using the following formula: BMI = (weight * 703) / (height * height) Notice that two values, weight (in pounds) and height (in inches), must be input by the user. The program then uses the formula to calculate the BMI and displays that value (with an appropriate message) to the user. Modularize the program. The program should have separate modules to display a welcome message, get the user’s input, calculate the body mass index, display the output, and display a termination message. Include a new module that will determine the category the calculated BMI indicates and include that category in the output displayed to the user. BMI BMI Categories bodyMassIndex < 18.5 underweight bodyMassIndex 18.5 -24.9 normal weight bodyMassIndex 25-25.9 overweight bodyMassIndex >= 30 obese Note: the following is a link to a windows based BMI calculator created by the National Health and Human Services - National Institutes of Health. The categories can be found on this website. http://www.nhlbisupport.com/bmi/ Part 1: Requirements Analysis : list input variables, processes (modules), and output variables Input variables: height, weight Processes: displayWelcome, getInput, calculateBMI, displayOutput, displayTerminationMessage Output variables: bodyMassIndex, category Part 2: Hierarchy Chart Part 3: Write the pseudocode for this problem...
View Full Document

This document was uploaded on 07/31/2011.

Page1 / 7

sample week 3 lab - BMI Calculator displayWelcom eMessage...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online