i need to create a project that allows a teacher to enter three test scores for each of the three students.
the appliaction should calculate each students average test score and assign a letter grade based on the grading scale shown below.
average test score letter grade
90 or greater a
80 through 89 b
70 through 79 c
60 through 69 d
below 60 f
input boxes should be used for the following user input. the application should prompt the user for each students name and three scores.
Input Validation: Should be used on the test scores to assure they are valid. a negative number or character should not be accepted. only postive whole numbers less than or equal to 100 should be accepted.
Public Class frmGradeReport
Private Sub BtnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnExit.Click
Me.Close()
End Sub
Private Sub btnEnterData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnENterData.Click
Dim Name As String
Dim Score1 As Integer
Dim Score2 As Integer
Dim Score3 As Integer
Dim Average As String
Dim intcount As String
Dim Test As Single
Test = 3
intcount = 0
Do Until intcount = Test
Name = InputBox("Enter student's name:", "Input Needed")
Score1 = InputBox("Enter a test Score1:", "Input Needed")
Score2 = InputBox("Enter a test Score2:", "Input Needed")
Score3 = InputBox("Enter a test Score3:", "Input Needed")
Average = (Score1 + Score2 + Score3) / 3
If Average < 60 Then
lstDisplay.Items.Add(Name + " " + "Average:" + Average.ToString() + " " + "Grade:" + " " + "E")
ElseIf Average < 70 Then
lstDisplay.Items.Add(Name + " " + "Average:" + Average.ToString() + " " + "Grade:" + " " + "D")
ElseIf Average < 80 Then
lstDisplay.Items.Add(Name + " " + "Average:" + Average.ToString() + " " + "Grade:" + " " + "C")
ElseIf Average < 90 Then
lstDisplay.Items.Add(Name + " " + "Average:" + Average.ToString() + " " + "Grade:" + " " + "B")
ElseIf Average < 100 Then
lstDisplay.Items.Add(Name + " " + "Average:" + Average.ToString() + " " + "Grade:" + " " + "A")
End If
intcount += 1
Loop
End Sub
End Class
any help would be appreciated thank you