Essay
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
Private Sub btnDisplay_Click(ByVal sende...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q22: Each menu element is considered a(n)_ and
Q23: Which of the following shortcut keys should
Q24: Assume that the value of the string
Q25: A literal type character forces a literal
Q26: Case 1 - Human Resources Application<br>An application
Q28: What is the difference between a menu
Q29: If an application expects the user to
Q30: Write the Visual Basic statements needed to
Q31: How many characters will be removed from
Q32: Write the Visual Basic statement to assign