Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Open the Bonus Solution (Bonus Solution.sln) file contained in the VbReloaded201

ID: 3672416 • Letter: O

Question

Open the Bonus Solution (Bonus Solution.sln) file contained in the VbReloaded2012
Chap05Bonus Solution folder. (4, 6, 8, 10)
a. The user will enter the sales amount as an integer in the salesTextBox, which
should accept only numbers and the Backspace key. Code the appropriate event
procedure.
b. The calcButton_Click procedure should display the salesperson’s bonus. A
salesperson with sales from $0 through $3,500 receives a 1% bonus. A salesperson
with sales from $3,501 through $10,000 receives a 5% bonus. A salesperson whose
ales are more than $10,000 receives a 10% bonus. The procedure should display
the bonus, formatted with a dollar sign and two decimal places, in the
bonusLabel. The procedure should not make any calculations when the
salesTextBox is empty; rather, it should display an appropriate message in a
message box. Code the procedure.
c. Save the solution and then start and test the application. Close the solution

Explanation / Answer

can help u with this:

Option Explicit On
Option Strict On
Option Infer Off
Public Class JMSales
Private salesid() As String = {"101", "112", "203", "301", "302"}
Private Sub salesTextBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles salesTextBox.KeyPress
If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso
e.KeyChar <> ControlChars.Back Then
e.Handled = True
End If
End Sub
Private Sub ClearList()
totalsTextBox.Text = String.Empty
End Sub
Private Sub totalsButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles totalsButton.Click
Dim sales As Double
Dim subscript As Integer
Dim inputsales As Integer
Dim salesAccumulator As Double
Integer.TryParse(CStr(salesidListBox.SelectedItem), CIntsalesid(4))
Double.TryParse(salesTextBox.Text, sales)
subscript = CInt(salesidListBox.SelectedItem)
For Each subscript As Integer In salesid
salesAccumulator += sales
Next subscript
salesAccumulator = salesAccumulator + sales
End Sub

Dim sales As Double
Dim subscript As Integer
Dim total As Double
Double.TryParse(salesTextBox.Text, sales)
subscript = CInt(salesidListBox.SelectedItem)
Array.Sort(salesid)
For total As Double = salesid(0) + salesid(1) + salesid(2) + salesid(3) + salesid(4)
For subscript As Integer = CInt((salesid(4) & " " & sales & ControlChars.NewLine))
Next subscript
End Sub
Private Sub exitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles exitButton.Click
Me.Close()
End Sub
Private Function CIntsalesid(ByVal p1 As Integer) As Integer
Throw New NotImplementedException
End Function
End Class