Hello guys, I'm looking for help on writing this program. I need to calculate the shipping cost of an item depending on the wight the user inputs.
I have done the program as a console application already and it works, however, the assignment calls for a WPF and I'm not sure what else I need to do here.
This is what I have so far for the WPF
weight = user input
label 4 is the message being displayed
The code is only reading the first line in the if...elseif regardless of what I input on the weight text box on the form and I'm not really sure how I should go to fix that. Any help is appreciated.
I have done the program as a console application already and it works, however, the assignment calls for a WPF and I'm not sure what else I need to do here.
This is what I have so far for the WPF
weight = user input
label 4 is the message being displayed
The code is only reading the first line in the if...elseif regardless of what I input on the weight text box on the form and I'm not really sure how I should go to fix that. Any help is appreciated.
Code:
Dim price As Double
Dim weight As Double
If weight < 1 Then
price = 2.5
ElseIf weight >= 1 And weight < 5 Then
price = 10
ElseIf weight >= 5 And weight < 10 Then
price = 15
ElseIf weight = 10 Then
price = 16
End If
label4.Text = ("The shipping cost will be $" & price)
Comment