Public Class Form1 '///// CST112 Danielle Clark - avg pgm '//// Global declarations. Dim many As Integer = 0 ' how many values. Dim total As Integer = 0 ' Total (so far). Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click End Sub Private Sub BtnEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnEnter.Click '// Accumulate numbers into a total '0. Declarations, INIT. Dim n As Integer ' the next input # '1. INPUT: Get # from TxtInput n = Val(Me.TxtInput.Text) '2. PROCESS: Add n to total. total = total + n many = many + 1 '3. OUTPUT: Display the total (so far). Me.LbOutput.Items.Add("The total (so far) is: " _ & Format(total)) End Sub Private Sub BtnAvg_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnAvg.Click '//// COmpute and display the average Dim avg As Double '1. INPUT: Global variables '2. PROCESS: Compute the average = total / many avg = total / many '3. OUTPUT: Display it. Me.LbOutput.Items.Clear() Me.LbOutput.Items.Add("the average is " & avg) End Sub End Class