Public Class Form1 '//////////////CREATED BY ZEKI OZYILMAZ for CST112 'Declarations Private Sub B1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B1.Click 'Step0. Declarations Dim a, b, c As Double 'Step1. Input a = geta() b = getb() 'Step2. Process C = calcadd(a, b) 'Step3. Output output(c) End Sub Function geta() As Double Dim s = Ta.Text Return Val(s) End Function Function getb() As Double Dim s = Tb.Text Return Val(s) End Function Function calcadd(ByVal a As Double, ByVal b As Double) As Double Return a + b End Function Sub output(ByVal c) ListBox1.Items.Add("The result is " & c) End Sub Private Sub B2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles B2.Click 'Step0. Declarations Dim a, b, c As Double 'Step1. Input a = geta() b = getb() 'Step2. Process c = calcsub(a, b) 'Step3. Output output(c) End Sub Function calcsub(ByVal a As Double, ByVal b As Double) As Double Return a - b End Function Private Sub BBigger_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BBigger.Click 'Step0. Declarations Dim a, b, c As Double 'Step1. Input a = geta() b = getb() 'Step2. Process c = calcbig(a, b) 'Step3. Output outputb(c) End Sub Function calcbig(ByVal a As Double, ByVal b As Double) As Double If a > b Then Return a Else Return b End If End Function Sub outputb(ByVal c) ListBox1.Items.Add("The bigger number is " & c) End Sub Private Sub BSmaller_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BSmaller.Click 'Step0. Declarations Dim a, b, c As Double 'Step1. Input a = geta() b = getb() 'Step2. Process c = calcsmall(a, b) 'Step3. Output outputs(c) End Sub Function calcsmall(ByVal a, ByVal b) If a > b Then Return b Else Return a End If End Function Sub outputs(ByVal c) ListBox1.Items.Add("The smaller number is " & c) End Sub Private Sub BQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BQuit.Click Dim n As Integer N = MsgBox("Do you want to quit?", MsgBoxStyle.YesNo, "Quitting?") If n = 6 Then Me.Close() End If End Sub End Class