Examlex

Solved

The Following Sample of Code Contains Errors

question 27

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


Definitions:

WBC

White Blood Cells; the cells of the immune system that are involved in protecting the body against both infectious disease and foreign invaders.

Hereditary Blood Disease

A genetic disorder affecting the blood, passed from parents to offspring.

Prolonged Coagulation

An extended process of blood clotting, which may indicate an underlying clotting disorder.

Erythrocyte Destruction

The breaking down of red blood cells, a process that can lead to conditions such as anemia.

Related Questions