Question: Assignment 5 Before attempting this project, be sure you have completed all of the reading assignments, nongraded exercises, discussions, and assignments to date. Write a
Assignment 5
Before attempting this project, be sure you have completed all of the reading assignments, nongraded exercises, discussions, and assignments to date. 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 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 centimeters
(c) Calculate BMI method that gets weight in kilograms and height in centimeters and returns BMI value 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.
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: o Underweight < 18.5 o Normal 18.5 - 24.99 o Overweight 25.0 - 29.99 o Obese >30.0
Test program:
A minimum of 4 test cases should be supplied in the form of table with columns indicating the input values, expected output, actual output and if the test case passed or failed. This table should contain 4 columns with appropriate labels and a row for each test case. An example template is shown below. Note that the actual output should be the actual results you receive when running your program and applying the input for the test record.
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
Capture execution: You should capture and label screen captures associated with compiling your code, and running each of your test cases.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
