Design a VB.Net project that allows the user to enter the test score of a studen
ID: 3625933 • Letter: D
Question
Design a VB.Net project that allows the user to enter the test score of a student and click on a Button, to display the letter grade for the student in the output box. Assume that the test score is a number between 0-100, and the cutoff for A,B... is based on a straight - line scale i.e, score of 90 and more is an A, 80 to 90 is a B etc.The program should also display the number of test score processed at all times.Explanation / Answer
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim counter as Integer = 0 counter += 1 Dim score As Integer = CInt(TextBox1.Text) Select Case score Case Is 0 to 49 TextBox2.Text = F Case 50 To 59 TextBox2.Text = D Case Is 60 to 69 TextBox2.Text = C Case Is 70 to 79 TextBox2.Text = B Case Is >=80 TextBox2.Text = A End Select TextBox3.Text = cstr(counter) 'Displays number of test scores processed for every button click End Sub End Clas
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.