Results 1 to 9 of 9

Thread: totally lost.

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Posts
    7

    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

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    Toronto, ON
    Posts
    1,093

    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>.

  3. #3
    Fanatic Member BlindSniper's Avatar
    Join Date
    Jan 2011
    Location
    South Africa
    Posts
    865

    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 ?

    Useful CodeBank Entries of mine
    Expand Function
    Code Compiler
    Sudoku Solver
    HotKeyHandler Class

    Read this to get Effective help on VBForums
    Hitchhiker's Guide to Getting Help at VBF

  4. #4

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Posts
    7

    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.

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Posts
    7

    Re: totally lost.

    5$ paypal if someone will do this for me ;]

  6. #6
    Fanatic Member BlindSniper's Avatar
    Join Date
    Jan 2011
    Location
    South Africa
    Posts
    865

    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.

    Useful CodeBank Entries of mine
    Expand Function
    Code Compiler
    Sudoku Solver
    HotKeyHandler Class

    Read this to get Effective help on VBForums
    Hitchhiker's Guide to Getting Help at VBF

  7. #7

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Posts
    7

    Re: totally lost.

    How about $10

  8. #8
    Fanatic Member BlindSniper's Avatar
    Join Date
    Jan 2011
    Location
    South Africa
    Posts
    865

    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.

    Useful CodeBank Entries of mine
    Expand Function
    Code Compiler
    Sudoku Solver
    HotKeyHandler Class

    Read this to get Effective help on VBForums
    Hitchhiker's Guide to Getting Help at VBF

  9. #9
    Frenzied Member
    Join Date
    May 2006
    Location
    Toronto, ON
    Posts
    1,093

    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
  •  



Click Here to Expand Forum to Full Width