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

Write codes in Visal Basic language 2013 In Visual Basic, Suppose a course has u

ID: 3680043 • Letter: W

Question

Write codes in Visal Basic language 2013

In Visual Basic, Suppose a course has up to 10 students enrolled and three exams are given during the semester. Write a program that accepts each student’s name and grades as input, places the names in a one dimensional array, and places the grades in a two dimensional array. The program should then display each student’s name and semester average. Also, the program should display the median for each exam. (For an odd number of grades, the median is the middle grade after the grades have been ordered. For an even number of grades,it is the average of the two middle grades.)

Code in Visal Basic

Comment out your codes to be more clear, Thanks

Exam 1: Name Exam 2: Add Student Exam 3: Display Report Students' Semester Average Mark: 80.00 Steve: 68.33 Jeff: 91.00 Exam Medians 1 80 2: 80 3 85

Explanation / Answer

Public Class Form1
Dim sname(10) As String
Dim exam(10, 3) As Integer
Dim av(10) As Double

Dim i As Integer = 0
Dim j, k As Integer

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
For x = 0 To i - 1
MsgBox(sname(x))
TextBox5.Text = TextBox5.Text & sname(x) & " " & av(x)
Next

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
j = 0
k = 0

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim sum As Integer
'Dim av As Double
sname(i) = TextBox1.Text
exam(j, k) = Val(TextBox2.Text)
k = k + 1
exam(j, k) = Val(TextBox3.Text)
k = k + 1
exam(j, k) = Val(TextBox3.Text)
k = k + 1
j = j + 1
k = 0
sum = Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox4.Text)
av(i) = sum / 3
i = i + 1

End Sub
End Class

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote