please do not respond for additional payment!! I need to program a one dimension
ID: 3659589 • Letter: P
Question
please do not respond for additional payment!! I need to program a one dimensional array for grade and points allow me to enter in points for a grade and display corresponding grade. EX. store minimum points in points arrary {0, 300, 350, 400, 450} grades arrary {"F", "D", "C", "B", "A"} Enter points in pointstextbox and hit display button and it will show you the grade.Explanation / Answer
Private Sub uiDisplayButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles uiDisplayButton.Click Dim grade() As String = {"F", "D", "C", "B", "A"} Dim points() As Integer = {0, 300, 350, 400, 450} Select Case CType(Me.uiPointsTextBox.Text, Integer) Case Is >= points(4) : Me.uiGradeLabel.Text = grade(4) Case Is >= points(3) : Me.uiGradeLabel.Text = grade(3) Case Is >= points(2) : Me.uiGradeLabel.Text = grade(2) Case Is >= points(1) : Me.uiGradeLabel.Text = grade(1) Case Else : Me.uiGradeLabel.Text = grade(0) End Select End Sub
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.