Question

Visual Basic (VB) Code on Visual Studio

Code a Visual Basic (VB) program that calculates the final grade a school course. The program will ask the user to enter ten grades for assignments (each is out of 25), five grades for quizzes (each out of 30), a midterm grade out of 300, extra-credit final project points (out of 100), final test points (out of 300) The program will add all of the points you entered and show you a letter grade in a message box based on this criterion: 900 1000 A 800 -899 B 700 799 C 600-699 D Less than 600 F Hint: you can use arrays for the assignments and quizzes and use a for loop to enter grades for the 10 assignments and a for loop to enter the 5 grades for quizzes.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Output will be like

Form1 ra Assgn grade1 22 Quiz125 Assgn grade2 23 Quiz2 23 Quiz3 21 Assgn grade3 21 Assgn grade4 1 Assgn grade5 22 Assgn grade6 21 The grade is A Quiz4 14 Quiz5 17 Final test points OK let ranesh 259 Assgn grade7 22 Final project points 78 су Assgn grade8 13 Final test points 280 Assgn grade9 15 Assgn grade10 calculate 14

Code will be like

Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim total As Double = Convert.ToDouble(textBox1.Text) + Convert.ToDouble(textBox2.Text) + Convert.ToDouble(textBox3.Text) + Convert.ToDouble(textBox4.Text) + Convert.ToDouble(textBox5.Text) + Convert.ToDouble(textBox6.Text) + Convert.ToDouble(textBox7.Text) + Convert.ToDouble(textBox8.Text) + Convert.ToDouble(textBox9.Text) + Convert.ToDouble(textBox10.Text) + Convert.ToDouble(textBox11.Text) + Convert.ToDouble(textBox12.Text) + Convert.ToDouble(textBox13.Text) + Convert.ToDouble(textBox14.Text) + Convert.ToDouble(textBox15.Text) + Convert.ToDouble(textBox16.Text) + Convert.ToDouble(textBox17.Text)

If total >= 900 AndAlso total <= 1000 Then
MessageBox.Show("The grade is A")
End If

If total >= 800 AndAlso total <= 899 Then
MessageBox.Show("The grade is A")
End If

If total >= 700 AndAlso total <= 799 Then
MessageBox.Show("The grade is A")
End If

If total >= 600 AndAlso total <= 699 Then
MessageBox.Show("The grade is A")
End If

If total <= 600 Then
MessageBox.Show("The grade is F")
End If
End Sub

Please rate it if the above solution helps you in any way or if you have any concerns comment it, I will help you through again.

Add a comment
Know the answer?
Add Answer to:
Visual Basic (VB) Code on Visual Studio Code a Visual Basic (VB) program that calculates the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT