Program Name: Body Mass
Programmer: Michael Stovall
Date: Sept. 9, 2009
Intent: To acquire two values from the user and return the user's body mass index.
*/



import javax.swing.JOptionPane;

public classs BodyMassSwing
{
  public static void main(String[] args)
  {
  	// declare and construct variables

  	String height, weight;

  	int inches, pounds;

  	double kilograms, meters, index;

  	// object declaration

  	BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in));

  	// print user prompts and get user input

  	System.out println("\tThe Sun Fitness Center Body Mass Index Calculator");
  	System.out.println( );

  	System.out.print("\t\tEnter your height to the nearest inch: ");

  		height = dataIn.readLine( );
  		inches = Integer.parseInt(height);


  	System.out.print("\t\tEnter your weight to the nearest inch: ");

	  		height = dataIn.readLine( );
	  		inches = Integer.parseInt(weight);

	 //perform body mass calculation

	 meters = inches / 39.36;

	 kilograms = pounds / 2.2;

	 index= kilograms/ Math.pow(meters,2);

	 // output

	 System.out.println( );
	 System.out.print("\tYour body Mass Index is " + Math.round(index) + ".");
	 System.out.println( );
