Results 1 to 7 of 7

Thread: [2008] VB 2008 one dimensional array application - help :(

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2009
    Location
    pittsburgh, pa.
    Posts
    2

    [2008] VB 2008 one dimensional array application - help :(

    i'm extremely confused. my professor gave us this as the FIRST problem to do in this intro to VB class...on page 380 of our text. it is due today and i have been up all night trying to figure out where to even start. i'm so frustrated. could someone please help me and steer me in the right direction?


    here's the overview:

    use a one dimensional array to solve the following problem: a company pays its salespeople on a commission basis. the sales people receive $200/week, plus 9% of their gross sales for that week. for example, a salesperson who grosses $5,000 in sales in a week receives $200 plus 9% of $5,000, a total of $650. write an application (using an array of counters) that determines how many of the salespeople earned salaries in each of the following ranges (assuming that each salesperson's salary is truncated to an integer amount): $200-299, $300-399, $400-499, $500-599, $600-699, $700-799, $800-899, $900-999 and over $999.

    Allow the user to eanter the sales for each employee in a TextBox. The user clicks the Calculate Button to calculate the person's salary. when the user is done entering this information, clicking the Show Totals Button displays how many of the salespeople earned salaries in each of the above ranges.

    The finished applications should behave like the one on the attachment below.

    I know i sound like a complete noob...but i am to VB 2008/studio. an help would be greatl appreciated. i'm sure it would only take someone that actually knew this program 5-10 minutes to do...i just need help badly. thank you!

    xo- nico
    Attached Images Attached Images  

  2. #2
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,950

    Re: [2008] VB 2008 one dimensional array application - help :(

    I know i sound like a complete noob...but i am to VB 2008/studio. an help would be greatl appreciated. i'm sure it would only take someone that actually knew this program 5-10 minutes to do...i just need help badly. thank you!
    That may be true, but if one of us writes it, you will be deprived of a learning experience. So I'm afraid much as many of us would like to help, forum rules are that we cant/wont do your homework for you.

    If however, you generate some code and it is not working then come back here and we'll try and help you debug it.

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2009
    Location
    pittsburgh, pa.
    Posts
    2

    Re: [2008] VB 2008 one dimensional array application - help :(

    i don't want someone to do my homework. i just want to know how to even get started. i have never coded before. even some links that may help to translate this so i could actually find a starting point would be appreciated. i was just stating that the problem is not that complex, seemingly to someone that has a lot of experience with this. sorry.

  4. #4
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,423

    Re: [2008] VB 2008 one dimensional array application - help :(

    which part are you having trouble with?

  5. #5
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: [2008] VB 2008 one dimensional array application - help :(

    here is a little help

    Code:
        Dim buckets() As Integer = {0, 0, 0, 0, 0, 0, 0, 0, 0}
        Private Sub add1ToBucket(ByVal amt As Long) 'call this with the earned salary
            Select Case amt
                Case Is >= 1000
                    buckets(8) += 1
                Case Is >= 900
                    buckets(7) += 1
                Case Is >= 800
                    buckets(6) += 1
                    '
                    '
                    'you need the other cases
                    '
                    '
                Case Is >= 200
                    buckets(0) += 1
                Case Else
                    'less than 200
            End Select
        End Sub
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  6. #6
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,423

    Re: [2008] VB 2008 one dimensional array application - help :(

    where do the buckets come in to it???

  7. #7
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: [2008] VB 2008 one dimensional array application - help :(

    "write an application (using an array of counters) that determines how many of the salespeople earned salaries in each of the following ranges (assuming that each salesperson's salary is truncated to an integer amount): $200-299, $300-399, $400-499, $500-599, $600-699, $700-799, $800-899, $900-999 and over $999."
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

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