Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a GUI class BMI that allows you to compute your body mass index ( bmi ) . The following shows the initial window that
Write a GUI class BMI that allows you to compute your body mass index bmi The following
shows the initial window that would display when you type BMImainloop:The user should type a height in inches and a weight in pounds into the window. The following
shows an example:After entering a weight and a height and then clicking the button, the computed bmi should
appear in a new window. In addition to displaying the bmi, the window should also classify the
bmi. A bmi less than is considered underweight. A bmi above but less than is
considered normal. A bmi greater than but less than is considered overweight. A bmi
greater than or equal to is obese. The following shows an example of what the new window
should look like:
At the same time that the window with the bmi is displayed, the main window should be emptied
so that each of the entries is ready for the next set of numbers:
You should use exception handling to deal with the situation where the user enters values that do
not correspond to numbers. For example if the user types the following:
When this occurs or when the user types an invalid number for the height or both the following
window should be displayed:
After the user dismisses the error window, the user should be allowed to enter a height and
weight again as follows:
The formula for computing the BMI is weight height You should test your class by
writing BMImainloop All the methods but the event handler are written for you. Please start
by downloading the lab template from the DL site.It th
Enteryour height:
Enteryour weight:
Compute BMI
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started