The following sample of code contains errors. Rewrite the incorrect statements to correct all errors.
-Private Sub btnDisplay_Click(ByVal sender As Object,ByVal e As System.EventArgs)Handles btnDisplay.Click
' displays a pay rate based on an employee's code
' Full Time employee pay rate is 11.50.Part Time
' employee pay rate for those working more than 30 hours
' is 10.50,otherwise it is 9.50
Dim strEmpCode As String
Dim decPayRate As Integer
strCode = txtEmpCode.Text.Snip
' validate the employee code
If strEmpCode = "FT##" Then
decPayRate = 11.50
ElseIf strEmpCode Like "PT30##" Then
decPayRate = 9.50
Else
decPayRate = 10.50
End If
' display pay rate
lblPayRate.Text = decPayRate.ToString("N2")
End Sub
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q43: Write a Visual Basic statement that will
Q44: Write the Visual Basic statement that inserts
Q45: Write the Visual Basic statement that uses
Q46: Write the condition that evaluates to True
Q47: The txtGrade control contains the string "95%".Write
Q49: The strCityState variable contains the string "AtlantaGA".Write
Q50: Case 1 - Human Resources Application
An application
Q51: The strPhone variable contains a 10-digit phone
Q52: Write a Visual Basic statement that removes
Q53: Write the Visual Basic statements needed to
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents