{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

BMI2 - @return is the converted value lbs to kgs public...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/** *BMI2.java This class converts height in inches to meters, *converts lbs to kilograms, and Calculates the BMI of a person. * *@author Richard Nelson *@version 1.0 */ public class BMI2 { /** *This method converts inches to meters *@param inc is the inches to be converted to meters *@return The converted value inches to meters */ public static double converth(double inc) { return inc/39.37; r } /** *This method converts lbs to kgs *@param lbs is the lbs to be converted
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: *@return is the converted value lbs to kgs */ public static double convertw(double lbs) { return lbs/2.2; r } /** *This method calculates the BMI *@param bmi is height/masss^2 */ public static void calcBMI(double bmi ) { System.out.println("Body Mass Index:"+bmi); } public static void main(Stringargs) { double mass = converth(65); double kilograms = convertw(125); calcBMI(kilograms/(mass*mass)); c } }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online