one dimensional array VB 2008 studio

never had any VB before - 1st assignment - totally lost

Page 1 of 1

3 Replies - 7938 Views - Last Post: 07 March 2009 - 11:52 AM Rate Topic: -----

#1 nic0   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 07-March 09

one dimensional array VB 2008 studio

Posted 07 March 2009 - 11:21 AM

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 enter 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. any help would be greatly appreciated. i'm sure it would only take someone that actually knew this program 5-10 minutes to do...i just need help badly. i'm not even sure where to start on this, or i would post code. any links even to something i could read that might help me translate this easier would also be appreciated. thank you!

xo- nico

Attached image(s)

  • Attached Image


Is This A Good Question/Topic? 0
  • +

Replies To: one dimensional array VB 2008 studio

#2 PsychoCoder   User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1659
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: one dimensional array VB 2008 studio

Posted 07 March 2009 - 11:42 AM

You're going to need to show us what you've completed so far, we're not just going to do your homework for you :)

[rules][/rules]
Was This Post Helpful? 0
  • +
  • -

#3 AdamSpeight2008   User is offline

  • MrCupOfT
  • member icon

Reputation: 2298
  • View blog
  • Posts: 9,535
  • Joined: 29-May 08

Re: one dimensional array VB 2008 studio

Posted 07 March 2009 - 11:48 AM

Don't think of the whole problem, think it as a bunch of smaller problems.
1. Determine if the sales amount is greater or equal 5000
2. Calculate the salary 200 + 9% of Sale Amount.
3. A selection based the groupings.
4. Increment the corresponding array entry
5. Display the results.

Post your solution code for problem 1.
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades   User is offline

  • Saucy!
  • member icon

Reputation: 6246
  • View blog
  • Posts: 24,014
  • Joined: 23-August 08

Re: one dimensional array VB 2008 studio

Posted 07 March 2009 - 11:52 AM

With a little Google search, I was able to find the entire chapter (PDF) from which this exercise was taken. The chapter is a tutorial in how to do one-dimensional arrays (and comboboxes). There is no reason you can't use everything that's been given to you in that chapter to accomplish your task...and the exercise gives you each step you need to take:

Attached image(s)

  • Attached Image

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1