You need to modify the code so the result which prints to the label states the category the user is in. The table of categories is below. BMI range - kg/m? Category Severe Thinness < 16 Moderate Thinness 16 - 17 Mild Thinness 17 - 18.5 Normal 18.5 - 25 25 - 30 30 - 35 35 - 40 > 40 Overweight Obese Class I Obese Class II Obese Class III You can use else if statements to do this probably the easiest method or Select Case to do it. For example Dim yBMI As Decimal Select Case yBMI Case yBMI < 16 Code Here Case And so on et

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter7: String Manipulation
Section: Chapter Questions
Problem 3E
icon
Related questions
Question
100%


the progam is : 

Public Class Form1
Public Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
'Declare variables
Dim vHeight As Decimal
Dim vWeight As Decimal
Dim vBMI As Decimal

'get and test values entered by user
'tests user has entered a value for height
If txbHeight.Text = “” Or txbWeight.Text = “” Then
'Call error message sub procedure
ErrorMessage(“Please enter your height and weight in the box!”)
Exit Sub
End If

'Calculate Body Mass initialize variables
vWeight = Val(txbWeight.Text)
vHeight = Val(txbHeight.Text)
'Calculate Body Mass Index ^ is for exponents
vBMI = vWeight / (vHeight ^ 2)

'Output message to Label

txbResult.Text = vBMI

Call ErrorMessage()
End Sub

Public Sub ErrorMessage() 'public sub for error msg box

End Sub

Public Sub ErrorMessage(errormsg As String) ' parameter for error message
MessageBox.Show(errormsg) 'to show the message box
End Sub

Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click 'close button
Close() ' close
End Sub
End Class
.................................................................................................................
please add this to the progam ( the image)

(note that this is visual basic windows form app)

You need to modify the code so the result which prints to the label states the category the
user is in. The table of categories is below.
BMI range - kg/m?
Category
Severe Thinness < 16
Moderate Thinness 16 - 17
Mild Thinness
17 - 18.5
Normal
18.5 - 25
25 - 30
30 - 35
35 - 40
> 40
Overweight
Obese Class I
Obese Class II
Obese Class III
You can use else if statements to do this probably the easiest method or Select Case to do
it.
For example
Dim yBMI As Decimal
Select Case yBMI
Case yBMI < 16
Code Here
Case
And so on et
Transcribed Image Text:You need to modify the code so the result which prints to the label states the category the user is in. The table of categories is below. BMI range - kg/m? Category Severe Thinness < 16 Moderate Thinness 16 - 17 Mild Thinness 17 - 18.5 Normal 18.5 - 25 25 - 30 30 - 35 35 - 40 > 40 Overweight Obese Class I Obese Class II Obese Class III You can use else if statements to do this probably the easiest method or Select Case to do it. For example Dim yBMI As Decimal Select Case yBMI Case yBMI < 16 Code Here Case And so on et
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage