[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!
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.
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.
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
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."