Answered step by step
Verified Expert Solution
Link Copied!

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 BMI().mainloop():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 18.5 is considered underweight. A bmi above 18.5 but less than 25 is
considered normal. A bmi greater than 25 but less than 30 is considered overweight. A bmi
greater than or equal to 30 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 *703/ height **2. You should test your class by
writing BMI().mainloop(). All the methods but the event handler are written for you. Please start
by downloading the lab template from the D2L site.It th
[.x
Enteryour height: 67
Enteryour weight: 140
Compute BMI
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

Personal knowledge of and contact with each appraised individual

Answered: 1 week ago

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago