Placeholder

CMIS 141 Assignment 5 Body Mass Index

$19.00

Description

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
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
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)
SCREENSHOTS
SOLUTION
PAYMENT
CMIS 141 Assignment 5 Test Cases
CMIS 141 Assignment 5 Screenshot
CMIS 141 Assignment 5 BMI
The solution consists of:
A report word document for this assignment
All Java programs in case you want to run theses programs on your computer.
Screenshots while running programs
Attachments [Move over files to preview content of those files]
CMIS_141_Assignment_5.zip (211.76 KB)
CMIS 141 Assignment 5 Report.docx
CMIS141-Assinment-5-Screenshot-1.png
CMIS141-Assinment-5-Screenshot-2.png
CMIS141-Assinment-5-Screenshot-3.png
Source Code
CMIS141Assignment5.java
Preview CMIS141Assignment5.java
xxxxxx.xxx.xxxxxxx(“9. xxxx xxxxxxx”);
}
xxxxxx xxxxxx xxxx xxxx(xxxxxx[] xxxx) {
xxxxxxx xx = xxx xxxxxxx(xxxxxx.xx);
while (true) { displayMenu(); // display menu for user System.out.println(“Enter your selection: “); int choice = sc.nextInt(); // prompt the user to enter choice if (choice == 9) { // exit program return; } else if (choice == 1) { // convert pounds into kilogams System.out.println(“Enter weight in pounds: “); double weight = sc.nextDouble(); double newWeight = 0.45 * weight; System.out.println(weight + ” lbs = ” + newWeight + ” kg”); } else if (choice == 2) { // convert inches to centimeters
xxxxxx.xxx.xxxxxxx(“xxxxx xxxxxx xx xxxxxx: “);
xxxxxx xxxxxx = xx.xxxxxxxxxx();
xxxxxx xxxxxxxxx = 2.54 * xxxxxx;
xxxxxx.xxx.xxxxxxx(xxxxxx + ” xxxxxx = ” + xxxxxxxxx + ” xx”);
} xxxx xx (xxxxxx == 3) { // xxxxxxxxx xxxx xxxx xxxxx
xx.xxxxxxxx();
Price: $19
You May Also Like:
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

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.