Exercise 8 Public Class Form1 Private Sub btnCalculate_Click(ByVal sender As system.object, ByVal e As system.eventArgs) handler for calculating cost of a Click. If chkCallWaiting.checked = True Then numOptions += 1 End If Select Case numOptions Case 1 cost = 3 3. Case 2 cost = 2 3. Case 3 cost = 3 3 end select me.lbl
Exercise 8 Public Class Form1 Private Sub btnCalculate_Click(ByVal sender As system.object, ByVal e As system.eventArgs) handler for calculating cost of a Click. If chkCallWaiting.checked = True Then numOptions += 1 End If Select Case numOptions Case 1 cost = 3 3. Case 2 cost = 2 3. Case 3 cost = 3 3 end select me.lbl
Exercise 8 Public Class Form1 Private Sub btnCalculate_Click(ByVal sender As system.object, ByVal e As system.eventArgs) handler for calculating cost of a Click. If chkCallWaiting.checked = True Then numOptions += 1 End If Select Case numOptions Case 1 cost = 3 3. Case 2 cost = 2 3. Case 3 cost = 3 3 end select me.lbl
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