Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

General Requirements The Windows Form should be easy to understand using appropr

ID: 3664238 • Letter: G

Question

General Requirements

The Windows Form should be easy to understand using appropriate labels and ToolTip controls to help the user navigate through the application

Comments should be placed throughout your VB code. Variables and control objects should follow common naming conventions

Data entered into control objects should be stored in an Array using an appropriate data type

Display the output using a textbox or label control object

Use Error Handling (Try...Catch…Finally) to account for common errors

Display a message to the user where necessary

VB.NET Single Windows Form, Array, Variable and Data Types, Data Assignment, Conditional Statements, Error Handling Basic Statistics Develop a single Windows Form application to calculate and display the mean, variance, and standard deviation of a minimum of 6 data points. Based on the mean, assign and display a letter grade based on the information shown below: Mean: 10 n-1 Variance: 2= variance: 2- Standard Deviation: Grade: Mean Range Letter Grade 88-93 82- 87 76-81 70-75 64 69 63 8-

Explanation / Answer

private double getStandardDeviation(List<double> doubleList)

{

   double average = doubleList.Average();

   double sumOfDerivation = 0;

   foreach (double value in doubleList)

   {

      sumOfDerivation += (value) * (value);

   }

   double sumOfDerivationAverage = sumOfDerivation / (doubleList.Count - 1);

   return Math.Sqrt(sumOfDerivationAverage - (average*average));

}

Public Class frmMain

    Private Function CalculateGrade _

            (ByVal testScore1 As Decimal, ByVal testScore2 As Decimal, _

      ByVal testScore3 As Decimal) As String

        Dim AverageScore As String

        Dim strLetterGrade As String

        Dim intNum1 As Integer

        Dim intNum2 As Integer

        Dim intNum3 As Integer

        Dim intNum4 As Integer

        AverageScore = testScore1 + testScore2 + testScore3 / 3

        strLetterGrade = {"A", "B","C", "D", "F"}

        intNum1 = 90

        intNum2 = 80

        intNum3 = 70

        intNum4 = 60

        If AverageScore >= 90 Then

            Return strLetterGrade("A")

        Else

            If AverageScore >= 80 Then

                Return strLetterGrade("B")

            Else

                If AverageScore >= 70 Then

                    Return strLetterGrade("C")

                Else

                    If AverageScore >= 60 Then

                        Return strLetterGrade("D")

                    Else

                        If AverageScore < 60 Then

                            Return strLetterGrade("F")

                        End If

                    End If

                End If

            End If

        End If

        Return strLetterGrade

    End Function

    Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click

        Me.Close()

    End Sub

    Private Sub txtTest1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtTest1.KeyPress

        ' allows the text box to accept only numbers, the period, and the Backspace key

        If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> "." _

            AndAlso e.KeyChar <> ControlChars.Back Then

            e.Handled = True

        End If

    End Sub

    Private Sub txtTest2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtTest2.KeyPress

        ' allows the text box to accept only numbers, the period, and the Backspace key

        If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> "." _

            AndAlso e.KeyChar <> ControlChars.Back Then

            e.Handled = True

        End If

    End Sub

    Private Sub txtTest3_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtTest3.KeyPress

        ' allows the text box to accept only numbers, the period, and the Backspace key

        If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> "." _

            AndAlso e.KeyChar <> ControlChars.Back Then

            e.Handled = True

        End If

    End Sub

    Private Sub txtTest1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtTest1.TextChanged

        lblGrade.Text = String.Empty

    End Sub

    Private Sub txtTest2_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtTest2.TextChanged

        lblGrade.Text = String.Empty

    End Sub

    Private Sub txtTest3_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtTest3.TextChanged

        lblGrade.Text = String.Empty

    End Sub

    Private Sub btnDisplay_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDisplay.Click

    End Sub

End Class

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote