Question: You are to write a program to grade multiple - choice exam. The exam has 2 0 questions, each answered with a number in the
You are to write a program to grade multiplechoice exam. The exam has questions, each answered with a number in the range of to The data are stored on a file examstxt where the first line is the key, consisting of a string of digits. Then each line consists of student name and the exam answers.
Benson,
Gause,
King,
Savon,
this what i have so far
Public Class Form
Dim names As String
Dim Answers As String
Dim key As String
Private Sub FormLoadsender As Object, e As EventArgs Handles MyBase.Load
Dim temp As String IOFile.ReadAllLinesscorestxt
ReDim namestempCount
ReDim AnswerstempCount
Dim input As String
read the input data into the names and answers array
For i As Integer To temp.Count
input tempiSplitc
namesi input
Answersi CDblinput
Next
End Sub
Private Sub btnResultsClicksender As Object, e As EventArgs Handles btnResults.Click
Dim min
Dim max
Dim total
For i To names.Count
Dim score As Integer
Dim answer As String Answersi
For j To key.Length
If keyj answerj Then
score
End If
Next
lstOutput.Items.Addnamesi & : & score
total score
'Get the grades and show each students grade
'Get the max and min
Next
'Show the max, min, and average
End Sub
End Class
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
