|
-
Dec 15th, 2011, 12:38 PM
#1
Thread Starter
New Member
totally lost.
I have a project due today and i can figure it out can anyone help.
here are the guidelines
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.
here is what i have now which isnt much.
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
-
Dec 15th, 2011, 12:49 PM
#2
Re: totally lost.
For starters, if the amounts are floating point numbers, you should be using doubles and not integers. Also, you're going to need five additional arrays to hold the data for each of the ranges and should populate those in a Select Case or If statement as you're populating the scores array.
Then, create a function for each of the requirements and pass the scores array into them to return and display the value.
(VB/C#) is clearly superior to (C#/VB) because it (has/doesn't have) <insert trivial difference here>.
-
Dec 15th, 2011, 12:51 PM
#3
Re: totally lost.
So, what is your question ?
And Your guidelines clearly state that the scores are floating point and yet you are using Integers. Why ?
-
Dec 15th, 2011, 12:59 PM
#4
Thread Starter
New Member
Re: totally lost.
i need help doing this. And yes i put integers because im a idiot. i dont know what is going on i can figure out how to calculate the range, mean, and standard deviation from the "data.txt" file.
-
Dec 15th, 2011, 01:05 PM
#5
Thread Starter
New Member
Re: totally lost.
5$ paypal if someone will do this for me ;]
-
Dec 15th, 2011, 02:31 PM
#6
Re: totally lost.
The unspoken rule of the forum is that we don't do homework. We might give you typs or point you in the right direction, but that is about it. And considering that there are two other threads about the exact same assignment it shouldn't be to hard to get help
http://www.vbforums.com/showthread.php?t=667538
http://www.vbforums.com/showthread.php?t=663974
Last edited by BlindSniper; Dec 15th, 2011 at 02:35 PM.
-
Dec 15th, 2011, 02:33 PM
#7
Thread Starter
New Member
-
Dec 15th, 2011, 02:43 PM
#8
Re: totally lost.
the vb.net form is for helping people and not for paid work, try the http://www.vbforums.com/forumdisplay.php?f=13 form if you want to pay someone to do the work that you don't want to.
-
Dec 16th, 2011, 09:48 AM
#9
Re: totally lost.
Ya, we're willing to help you with any problems you have and point you in the right direction, but we're not actually going to do the work for you.
(VB/C#) is clearly superior to (C#/VB) because it (has/doesn't have) <insert trivial difference here>.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|