Understand how to use the Java Foundation Classes (JFC) to create graphical user interfaces.
This lab assignment will ask you to write a program using the Java Foundation Classes.
Create a New Project named BMICalculator
Create a GUI application where the user enters a height in feet and inches and a weight (three inputs) into text fields. The application should have a button that displays the user’s BMI when clicked.
To calculate a person’s BMI, the formula is:
BMI = (Weight in Pounds / (Height in inches x Height in inches ) ) x 703
Body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women.
According to the NIH, the categories for BMI are:
Underweight = <18.5
Normal weight = 18.5–24.9
Overweight = 25–29.9
Obesity = BMI of 30 or greater
Submit a document with the source code and sample output in Blackboard.Attachments
overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar: JAR building
run: execution of project