|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| Question |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: |
Public Class Form1
'declare variable
Dim totalSalary As Double
Dim output As String
Dim salaryCounter As Integer
Dim employeeCounter As Integer
'create salaryRange Array
Dim salaryRange As String() = New String() { _
"$200 - $299", "$300 - $399", "$400 - $499", _
"$500 - $599", "$600 - $699", "$700 - $799", _
"$800 - $899", "$900 - $999", "$1000 +"}
'create employees Array
Dim employees As Integer() = New Integer(9) {}
Private Sub calculateButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles calculateButton.Click
'Calculate salary
totalSalary = 200 + ((Val(inputSalesTextBox.Text)) * 0.09)
'Append Salary to totalSalaryValueLabel
totalSalaryValueLabel.Text = String.Format("{0:C}", totalSalary)
inputSalesTextBox.Text = "" 'Clear inputSalesTextBox
End Sub 'calculateButton_Click
Private Sub showTotalsButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles showTotalsButton.Click
'set output header
output = ("Salary Range:" & ControlChars.Tab _
& "Total:" & ControlChars.CrLf)
For salaryCounter = 0 To 9
For employeeCounter = 0 To 9
If (Val(totalSalary) >= 200 And Val(totalSalary) <= 299) Then
employees(employeeCounter) += 1
ElseIf (Val(totalSalary) > 299 And Val(totalSalary) <= 399) Then
employees(employeeCounter) += 1
ElseIf (Val(totalSalary) > 399 And Val(totalSalary) <= 499) Then
employees(employeeCounter) += 1
ElseIf (Val(totalSalary) > 499 And Val(totalSalary) <= 599) Then
employees(employeeCounter) += 1
ElseIf (Val(totalSalary) > 599 And Val(totalSalary) <= 699) Then
employees(employeeCounter) += 1
ElseIf (Val(totalSalary) > 699 And Val(totalSalary) <= 799) Then
employees(employeeCounter) += 1
ElseIf (Val(totalSalary) > 799 And Val(totalSalary) <= 899) Then
employees(employeeCounter) += 1
ElseIf (Val(totalSalary) > 899 And Val(totalSalary) <= 999) Then
employees(employeeCounter) += 1
ElseIf (Val(totalSalary) > 999) Then
employees(employeeCounter) += 1
End If
Next
Next
output &= (salaryCounter & ControlChars.Tab & _
String.Format("{0:D}", ControlChars.CrLf))
salaryTotalsListBox.Text = output 'display results
End Sub 'showTotalsButton_Click
End Class ' Form1
|
Advertisement
| Hall of Fame |