I have a project due today and i can figure it out can anyone help.
here are the guidelines
here is what i have now which isnt much.Specifics
You will use 1 file to enter all the scores. The file is named Data.txt and should be stored in the projects Debug folder. The scores are floating point numbers.
One button should calculate the mean, range, and standard deviation and display them.
You must use separate functions to calculate the 3 statistics.
One button should display the frequencies in tabular form. For this exercise, the frequencies we are interested in are as follows:
# scores < 60
60 <= # scores < 70
70 <= # scores < 80
80 <= # scores < 90
90 <= # scores
You must use a separate array to hold the totals for the individual ranges.
All scores should be displayed in a listbox.
Code:Option Strict On Public Class Form1 Private names() As String = IO.File.ReadAllLines("data.txt") Private scores(names.Count - 1) As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For i As Integer = 0 To names.Count - 1 scores(i) = CInt(names(i)) Next End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click End Sub Function mean(ByRef sum As Integer) As Integer Dim total As Integer = 0 For i As Integer = 0 To scores.Count - 1 Next Return sum End Function End Class




Reply With Quote