Using a select case write a vb.net program that makes a decision when a driver over-speeds, displays the decision on label changing the color of the label for each decision.
Dim speed As Integer
Dim diff As Integer
'speed limits
Dim nofine As Integer = 60
Dim twenty As Integer = 60
Dim forty As Integer = 80
Dim sixty As Integer = 100
Dim last As Integer = 120
Select Case Val(TextBox1.Text)
Case 1
speed = Val(TextBox1.Text)
diff = speed - nofine
If diff <= 5 Then
Label2.Text = "No fine."
End If
End Select
End Sub
My problem is I'm failing to show the decision on a label. For each speed limit there is a decision if the driver over-speeds, for example for speed limit - 80MpH the decision is £40 fine and the label2.text should display that decision as well as changing its backcolor to yellow.