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

Could someone translate this visual basic code into structure english for me ple

ID: 3819779 • Letter: C

Question

Could someone translate this visual basic code into structure english for me please? (i.e Call procedure, Declare mailbox, Call function)

Private Sub btnReorganize_Click_Click(sender As Object, e As EventArgs Handles btnReorganize_Click.Click

'gets data from justices text file into array
dim justices () As String = IO.File.ReadAllLines("Justices.txt")
'query to get fullname and state of justices
Dim data = From judge in justices
Let line = judge.Split(","c)
Let firstName = line(0)
Let lastName = line(1)
Let state = line(3)
Let record = firstName &""& lastName &"," & state
Select record
'placing the query results into a file
IO.File.WriteAllLines("NewFile.txt",data)
End Sub
End Class

Explanation / Answer

Public Class frmTranslate
  
' Create Structure with a member for each language
Structure Translator
Dim english As String
Dim french As String
Dim german As String
End Structure
' Create array of structures
Dim trans(15) As Translator
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Add words to array of structures trans().
Dim temp As Translator
Dim sr As IO.StreamReader = IO.File.OpenText("words.TXT")
For i As Integer = 0 To 15
trans(i).english = sr.ReadLine
trans(i).french = sr.ReadLine
trans(i).german = sr.ReadLine
Next
'Close the reader
sr.Close()
'Perform bubble sort by English word.
For i As Integer = 1 To 15
For j As Integer = 1 To 16 - i
If Trans(j - 1).english > Trans(j).english Then
temp = Trans(j - 1)
Trans(j - 1) = Trans(j)
Trans(j) = temp
End If
Next
Next
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblFrench.Click
End Sub
Private Sub btnTranslate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTranslate.Click
'Translate English sentence to French and German.
Dim english() As String
'Hold results
Dim sentence As Translator
'Ensure the sentence ends with a period, get English words
Dim line As String = tbxEnterSentence.Text.Trim.ToUpper
If line.Substring(line.Length - 1) <> "." Then
line &= "."
End If
english = GetWords(line)
sentence = Translate(english)
'Display the results, format sentence to have period at the end
tbxFrench.Text = sentence.french.Trim & "."
tbxGerman.Text = sentence.german.Trim & "."
End Sub
Sub GetWords(ByVal line As String)
End Sub
End Sub
Sub Translate(ByVal english As String)
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