KINDLY SOLVE WITH VISUAL BASIC LANGUAGE USING VISUAL STUDIO Public Class frmGrades  Private Sub btnCompute_Click(sender As Object, e As EventArgs) Handles btnCompute.Click  Dim sum, avg As Double  For i As Integer = 0 To lstGrades.Items.Count - 1 Step 1  sum += CDbl(lstGrades.Items(i))  Next  avg = sum / lstGrades.Items.Count  lblAvg.Text = CStr(avg)  End Sub End Class 1. Explain the above code using your own words. 2. Re-write the code after converting for-next loop into any two loops of the  followings:  Do While Loop  Do Loop Until

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter16: Graphics
Section: Chapter Questions
Problem 14RQ
icon
Related questions
Question
100%

KINDLY SOLVE WITH VISUAL BASIC LANGUAGE USING VISUAL STUDIO

Public Class frmGrades
 Private Sub btnCompute_Click(sender As Object, e As EventArgs) Handles btnCompute.Click
 Dim sum, avg As Double
 For i As Integer = 0 To lstGrades.Items.Count - 1 Step 1
 sum += CDbl(lstGrades.Items(i))
 Next
 avg = sum / lstGrades.Items.Count
 lblAvg.Text = CStr(avg)
 End Sub
End Class
1. Explain the above code using your own words.
2. Re-write the code after converting for-next loop into any two loops of the 
followings:
 Do While Loop
 Do Loop Until
Do Loop While 

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT