Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Bexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bexit.Click Me.Close() End Sub Private Sub txtprice_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBagel.TextChanged End Sub Private Sub Bcalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bcalc.Click ' Calculate the tip for a meal Dim price As Double ' Amount of bagels Dim tip As Double ' cost of bagels 'INPUT: figure out amount of bagels price = Val(Me.txtBagel.Text) 'PROCESS: Calculate price tip = price * 0.75 If tip >= 6 Then tip = 0.6 * price ElseIf tip > 5 Then tip = price * 0.75 End If 'OUTPUT: Show price Me.lblTip.Text = tip End Sub End Class