Examlex
Problems - Correcting Code Errors
The following sample of code contains errors. Rewrite the incorrect statements to correct all errors.
Private Sub btnCalc_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalc.Click
' calculates and displays the total amount owed for purchasing hats
' user enters number of hats and price per hat
' all hats are on sale for 25% off the price
Dim dblNumHats As Integer
Dim decHatPrice As Decimal
Dim decDiscount As Double
Dim decTotal As Decimal
' assign number of hats and price to variables
Integer.TryPurse(txtNumHats.Text, intNumHats)
Decimal.TryParse(txtHatPrice, decHatPrice)
' calculate and display the total amount owed
decDiscount = decHatPrice * dblRATE
decTotal = (intNumHats + decHatPrice) - decDiscount
Total.Text = decTotal.ToString(C2)
End Sub
Sociocultural Perspective
An approach in psychology that examines how social and cultural factors influence human behavior and mental processes.
Psychodynamic Perspective
A psychological approach that emphasizes unconscious psychological processes and contends that childhood experiences are crucial in shaping adult personality.
Behaviorist
A behaviorist is a psychologist who focuses on observable behaviors and the ways in which learning and environment influence behavior, often excluding internal processes like thoughts and emotions.
Learning Perspective
A psychological approach that emphasizes the effects of experience on behavior, suggesting that learning is the key to understanding how people think, feel, and behave.
Q2: Actions performed by the user such as
Q5: The number of different colors used on
Q11: If the / filesystem becomes corrupted, the
Q19: Constructors never return a value, so they
Q20: The _ option to the ps command
Q23: The most common mail user agent used
Q27: When an object is instantiated (created), each
Q30: Why should log files be periodically cleared?
Q39: In the MessageBox.Show( text , caption ,
Q47: A source file contains a list of