Developing a GUI Application, programming homework help

·  Create a GUI that uses JTextField, JLabel, and JButton.

·  Write event handlers to process user data.

Class Information for project:

//Health Profile Class//

public class HealthProfile 

{

    private String name;

private int age;

private double weight;

private int height;

       

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public int getAge() {

return age;

}

public void setAge(int age) {

this.age = age;

}

public double getWeight() {

return weight;

}

public void setWeight(double weight) {

this.weight = weight;

}

public int getHeight() {

return height;

}

public void setHeight(int height) {

this.height = height;

}

        //Calculation for setting BMI//

public double getBMI()

{

return weight*703/(height*height);

}

        //if else statement for getting catergory//

public String getCategory()

{

if(getBMI()<18.5)

return “Underweight”;

else if(getBMI()>=18.5 && getBMI()<=24.9)

return “Normal”;

else if(getBMI()>=25 && getBMI()<=29.9)

return “Overweight”;

else

return “Obese”;

}

public int getMaxHR()

{

return 200-age;

}

   

}

"Is this question part of your assignment? We can help"

ORDER NOW