Write a Java program as follows:

  • (1) Prompt the user which action they want to take:
    (a) Convert pounds into kilograms
    (b) Convert height in inches to centimeters
    (c) Calculate BMI display category
    (d) Exit program
  • (2) Programs at a minimum must have the following methods:
    (a) Convert weight method gets pounds and returns kilograms
    (b) Convert to height method that gets height in inches and returns meters
    (c) Calculate BMI method that gets weight in kilograms and height in meters and returns BMI value
  • (3) For each action the user should be prompted for corresponding data and given the appropriate output
  • (4) User should be able to select one action and then get prompted again for selection until they select exit choice

CMIS 141 Assignment 5 Body Mass Index: Use the following for calculations

  • To convert from pounds to kilograms use the formula: 1 pound = 0.45 kilograms
  • To convert from height in inches to centimeters use the following formula: 1 inch = 2.54 cm
  • To calculate BMI use the formula: weight-kg/height-cm/height-cm * 10,000
  • For categories use:
    Underweight 18.5
    Normal 18.5 – 24.99
    Overweight 25.0 – 29.99
    Obese 30.0

CMIS 141 Assignment 5 Body Mass Index: Make sure your Java program is using the recommended style such as:

  • Javadoc comment up front with your name as author, date, and brief purpose of the program
  • Comments for variables and blocks of code to describe major functionality
  • Meaningful variable names and prompts
  • Identifiers are written in upper CamelCase
  • Class name starts with upper case letter and variables in lower case letter
  • Constants are written in All Capitals
  • Use proper spacing and empty lines to make code human-readable (Kernighan and Ritchie (KR) standard).
Related tasks

CMIS 141 Assignment 1 Student GPA,

CMIS 141 Assignment 2 Perform Operation on Two Numbers,

CMIS 141 Assignment 3 Calculate Student Grade,

CMIS 141 Assignment 4 Output Triangle and Diamond Pattern,

CMIS 141 Assignment 6 Highest and Lowest Score,

CMIS 141 Final Project Employee Salary,