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
File Names
Names given to identify digital files stored on a computer, server, or other media.
List View
A way of displaying a list of items on the screen, allowing users to scroll through or select items from the list.
Ribbon
A graphical control element in software that houses buttons, icons, and menus for quick access to a program's features.
Deleted Files
Files that have been removed from their original storage location, often placed in a temporary area (like the Recycle Bin) allowing for potential recovery.
Q5: Describe how the /etc/passwd and /etc/shadow directories
Q16: The txtGrade control contains the string "95%".
Q18: Problems - Correcting Logic and Code Errors
Q22: Based on the code below, intScores(3, 1)
Q23: Every object has attributes and behaviors. Describe
Q23: Write the code for a Sub procedure
Q23: In Windows applications, pressing the _ and
Q30: Write the condition that evaluates to True
Q31: In its simplest form, the Class statement
Q49: <img src="https://d2lvgg3v3hfg70.cloudfront.net/TBX9215/.jpg" alt=" If the intQuantity