Examlex
Problems - Correcting Logic and Code Errors
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 the pay rate associated with a pay code
Dim strCodes() As String = {PT1, PT2, FT1, FT2, FT3}
Dim dblRates() As Integer = {10.5, 12, 13.5, 14}
Dim strSearchForCode As String
Dim intSub As Integer
' assign the code to a variable
txtCode.Text = strSearchForCode
' search the strCodes array for the pay code
' continue searching until the end of the array
' or the pay code is found
Do Until intSub > strCodes.Length OrElse
strSearchForCode = strCodes(intSub)
intSub = intSub + 1
Loop
' determine whether the pay code was found
If intSub
lblRate.Text = dblRates(1).ToString("C0")
Else
MessageBox.Show("Invalid Pay Code",
"Employee Pay Application",
MessageBoxButtons.OK,
MessageBoxIcon.Information)
End If
txtCode.Focus()
End Sub
Void Contract
is an agreement without legal effect or binding force from its inception due to failure to meet essential legal requirements.
Justified Reliance
Legitimate dependence by a party on the representation or promise of another, typically in a legal or contractual context.
Scienter
A legal term that refers to knowledge of the wrongful nature of one's act or omission or the intent to deceive or defraud.
Fraud
Deliberate misleading actions taken to benefit oneself or harm another person.
Q11: _ are the operations (actions) that the
Q18: If you do not take deliberate steps
Q23: A control's _ event occurs when a
Q28: To access a member of a structure
Q35: The most commonly used properties for a
Q47: A database file contained in a project
Q49: Explain the scope and lifetime of variables.
Q53: When a check box is selected, its
Q58: A form's _ procedure is responsible for
Q297: Backing up a database rearranges how the