Results 1 to 2 of 2

Thread: Accumulate Test Score Data

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2010
    Posts
    5

    Unhappy Accumulate Test Score Data

    I have been working on a class project for sometime now. Currently stuck and need some help. Project is due today, so I'm desperate for some help. Please see attached project file. Any help will be appreciated.

    My code so far

    Code:
    Public Class Form1
    
        Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
            End
        End Sub
        Dim lNumbers As List(Of Integer) = New List(Of Integer)
        Dim highScore As Integer
        Dim Score As Integer
        Dim totalScore As Integer
        Dim numberScores As Integer
        Dim averageScore As Decimal
    
        Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
    
            If TextBox1.Text >= 0 And TextBox1.Text <= 100 Then
                lNumbers.Add(TextBox1.Text)
                Score = TextBox1.Text
                totalScore = totalScore + Score
                numberScores = numberScores + 1
                lblScoreCount.Text = numberScores
    
                If (Score > highScore) Then
                    highScore = Score
                End If
    
                lblScoreTotal.Text = totalScore
                averageScore = Math.Round(totalScore / numberScores, 2)
                lblAverage.Text = averageScore
            
    
        End Sub
    End Class
    Attached Images Attached Images
    Last edited by seanking; Oct 18th, 2010 at 02:55 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width