Question: can i get help with finding the highest scores count & the failed scores & Searching for student s last name and show the student

can i get help with finding the highest scores count & the failed scores & Searching for students last name and show the student name, ID, each score and its grade, and the overall grade & sorting the data out by last name?
this what i have so far:
Public Class Form1
Dim subjects() As String
Structure Student
Dim firstName As String
Dim lastName As String
Dim id As String
Dim scores() As String
End Structure
Dim studs(100) As Student
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
OpenFileDialog1.ShowDialog()
Dim filename = OpenFileDialog1.FileName
Dim srVar As IO.StreamReader = IO.File.OpenText(filename)
Dim line = srVar.ReadLine
Dim temp()= line.Split(","c)
Dim numOfSubjects = temp.Length
ReDim subjects(numOfSubjects -1)
Dim i As Integer
For i =0 To numOfSubjects -1
subjects(i)= temp(i).Trim
Next
i =0
Do Until srVar.EndOfStream
line = srVar.ReadLine
temp = line.Split(","c)
studs(i).firstName = temp(0).Trim
studs(i).lastName = temp(1).Trim
studs(i).id = temp(2).Trim
ReDim studs(i).scores(numOfSubjects -1)
For j =0 To numOfSubjects -1
studs(i).scores(j)=(temp(3+ j))
Next
i +=1
Loop
ReDim Preserve studs(i -1)
End Sub
Private Sub btnScore_Click(sender As Object, e As EventArgs) Handles btnScore.Click
lstResults.Items.Clear()
Dim header As String = String.Format("{0,-10}{1,-10}{2,-12}", "First", "Last", "ID")
For Each subject As String In subjects
header &= String.Format("{0,-10}", subject)
Next
lstResults.Items.Add(header)
For Each student In studs
If student.firstName IsNot Nothing Then
Dim studentRow As String = String.Format("{0,-10}{1,-10}{2,-12}", student.firstName, student.lastName, student.id)
For Each score As Integer In student.scores
studentRow &= String.Format("{0,-10}", score)
Next
lstResults.Items.Add(studentRow)
End If
Next
End Sub
Private Sub btnAverage_Click(sender As Object, e As EventArgs) Handles btnAverage.Click
Dim totalScores(subjects.Length -1) As Integer
Dim countScores(subjects.Length -1) As Integer
For i As Integer =0 To subjects.Length -1
For j As Integer =0 To subjects.Length -1
totalScores(j)+= studs(i).scores(j)
countScores(j)+=1
Next
Next
lstResults.Items.Clear()
lstResults.Items.Add("Course Averages")
For i As Integer =0 To subjects.Length -1
Dim averages As Double = totalScores(i)/ countScores(i)
lstResults.Items.Add(String.Format("{0}: {1:N1}", subjects(i), averages))
Next
End Sub
Private Sub btnSort_Click(sender As Object, e As EventArgs) Handles btnSort.Click
lstResults.Items.Clear()
Dim header As String = String.Format("{0,-10}{1,-10}{2,-12}", "First", "Last", "ID")
For Each subject As String In subjects
header &= String.Format("{0,-10}", subject)
Next
Dim student() As String =
IO.File.ReadAllLines("exams.txt")
Dim lastnameQuery = From lastname In student
Order By lastname.Length, lastname Ascending
Select lastname
For Each lastname As String In lastnameQuery
lstResults.Items.Add(lastname)
Next
End Sub
Private Sub btnFailedCourses_Click(sender As Object, e As EventArgs) Handles btnFailedCourses.Click
End Sub
Private Sub btnHighestScores_Click(sender As Object, e As EventArgs) Handles btnHighestScores.Click
End Sub
End Class You are to write a program to process student grades. Each student takes four courses: Math, CS, English, Business. The data are stored in a file (exam.txt), where the first line contains the subject of four courses, followed by each line consisting of the name of student (First Name, Last Name), student ID, which is 9 digit string, and the scores of four courses that each student is taking.
The input file contains the following data:
Math, Cs, English, Business
Jon, Benson,123456789,90,80,70,80
Brian, Gause,100000001,88,77,66,99
Ron, Heath, 204568762,77,66,88,93
June, King, 332549873,80,91,77,75
Luke, Savon,100045423,68,87,81,91
Tom, McClure, 286453218,77,88,60,90
Matt, Liskov, 438763298,43,68,70,63
Matthew, Moses,550550005,69,59,88,81
Justin, York, 432876489,93,86,73,55
1. Show the whole data in a tabular format like this in a list box.
2. Show the course average for each course. There should be one decimal digit.
Course average
Math: 76.1
(6)78.0
English: 74.8
Business: 80.8
3. Show the number of students failed in each course (the scores less than 70).
Number of failed students in each course
Math: 3
CS: 3
English: 2
Business: 2
can i get help with finding the highest scores

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!