As a student in the CIS 115 course, you are to write a program that can he used to calculate your course grade average. The grades that make up the final course grade are shown on the form below. These values are to be captured in textboxes. The user will also need to enter their name and jag number but for privacy reasons, these values aren’t to be displayed on the screen: they must be captured via Input Boxes. The name should be entered is the format: LastName, FirstName. The weights of the grades are shown in the syllabus. You should refer to your course syllabus to determine how the average is to be calculated. The program needs to generate a Student Identifier (keeping the name and jag number secure but giving a verification code). This value is generated by combining the first initial of the first name, the first initial of the last name, and the last three numbers of the jag number. (For the example below, the name was “Doe, John” and the Jag Number was J00988657.) The program should display the output as shown below. The program requires that you include a Clear Form button that removes information from all of the textboxes as well as the listbox. It should also reset the focus back to the first textbox. Finally, the program should have an Exit button that will end the program.
Expert Answer
Private Sub Cle_Click()
Text1.Visible = True
Text2.Visible = True
Label2.Visible = True
Label3.Visible = True
Text1.SetFocus
Text1.Text = ” ”
Text2.Text = ” ”
Text3.Text = ” ”
Text3.Text = ” ”
Text4.Text = ” ”
Text5.Text = ” ”
List1.Clear
End Sub
Private Sub Command1_Click()
Dim Tot As Double
Dim average As Double
Dim grade As String
Label2.Visible = False
Label3.Visible = False
Text1.Visible = False
Text2.Visible = False
List1.Text = “CIS 116 – Course Grade”
Text8.Text = (Val(Text3.Text * 15) / 100) + (Val(Text4.Text * 20) / 100) + ((Val(Text5.Text) + Val(Text6.Text) * 40) / 100) + (Val(Text7.Text * 25) / 100)
Text9.Text = (Val(Text8.Text) / 5)
If Val(Text8.Text >= 90) Then
Text9.Text = “A”
End If
If Val(Text8.Text >= 80) Then
Text9.Text = “B”
End If
If Val(Text8.Text >= 70) Then
Text9.Text = “C”
End If
If Val(Text8.Text >= 60) Then
Text9.Text = “D”
End If
If Val(Text8.Text <= 59) Then
Text9.Text = “F”
End If
List1.AddItem (Val(Text8.Text))
List1.AddItem (Val(Text9.Text))
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Text8.Visible = False
Text9.Visible = False
End Sub