You are on page 1of 1

Exercise 8

Public Class Form1


Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnCalculate.Click
Dim cost As Decimal
Dim numOptions As Integer = 0
If chkCallWaiting.Checked = True Then
numOptions += 1
End If
If chkCallForwarding.Checked = True Then
numOptions += 1
End If
If chkCallerID.Checked = True Then
numOptions += 1
End If
Select Case numOptions
Case 1
cost = 3.5
Case 2
cost = 2 * 3.5
Case 3
cost = 3 * 3.5
End Select
Me.lblCost.Text = cost + 25
End Sub
End Class

You might also like