{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

sample week 4 lab

sample week 4 lab - Week3:SampleLab getCategory Calculator...

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

View Full Document Right Arrow Icon
BMI Calculator displayTerminationMessage displayWelcom eMessage getInput calculateBMI displayOutput getCategory 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 Include a loop that will allow the user to re-enter the input if he/she chooses.  Be sure that the output for each  input displays before the user is able to re-enter new input values. 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
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern