Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

If an application contains the 0ption Strict On statement, which of the followin

ID: 3804579 • Letter: I

Question

If an application contains the 0ption Strict On statement, which of the following can be used to declare the Rate named constant? a. Const Rate As Decimal = 0.09 b. Const Rate As Decimal = Convert.ToDecimal (0.09) c. Const Rate As Decimal = 0.09D d. both b and c Which of the following statements adds the number 10.75 to the contents of the price variable? a. price += 10.75 b. price =+ 10.75 c. 10.75 += price d. both a and c Which of the following sends the focus to the test1TextBox? a. test1TextBox.Focus() b. test1TextBox.SendFocus() c. test1TextBox.SetFocus() d. SetFocus(test1TextBox)

Explanation / Answer

8.) The answer is c. Const Rate As Decimal = 0.09D.

a. This option tries to assign a floating-point value to a decimal variable. This can be done only by appending a 'D' at the end of the value.

b. This option tries to convert a double value to decimal which is a narrowing conversion and will throw a compile-time error if Option Strict is On.

d. It is not valid as b is not valid.

9.) The answer is a. price += 10.75.

b. Invalid operator (=+)

c. The operator (+=) adds right operand to the left operand and assigns the value to the left operand. This is not possible here, as left operand is not a variable.   

10.) The answer is c. The syntax to move focus to a specified control or object is: object.setFocus().

a. The method .Focus() does the same thing in .net.

Options b. and d. are not applicable.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote