You are on page 1of 1

Exercise 11

Public Class Form1


Private Sub btnOrder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnOrder.Click
Const SMALL As Decimal = 2.5
Const LARGE As Decimal = 4
Dim total As Decimal = 0
If Me.radLarge.Checked Then
total = 4
Else
total = 2.5
End If
If Me.chkLettuce.Checked = True Then
total = total + 0.1
End If
If Me.chkTomato.Checked = True Then
total = total + 0.25
End If
If Me.chkOnion.Checked = True Then
total = total + 0.1
End If
If Me.chkCheese.Checked = True Then
total = total + 0.5
End If
Me.lblTotal.Text = total
End Sub
End Class

You might also like