Which of the following represents an example of data validation?

A. if (daysOverdue > 10 || fineOwed > 0.00) {
   document.write("Please call the library immediately!"
   + BR);
}
B. if (!(daysOverdue > 10 || fineOwed > 0.00)) {
   document.write("Your account is in good standing." + BR);
}
C. if (age >= 18 && age <= 65) {
   document.write("The age is between 18 and 65." + BR);
}
D. while (!(month >= 1 && month <= 12)) {
   month = prompt
("ERROR...Enter a number between 1 and 12",ES);
}

Answer: D

Computer Science & Information Technology

You might also like to view...

Which of the following is not true about macros which have been converted to VBA?

A) They appear as modules in Access. B) The code will perform the same tasks as the original macro. C) They appear on the Navigation Pane. D) They do not appear on the Navigation Pane.

Computer Science & Information Technology

What will be the output when TruncateSum is used in the following lines of code?

``` Dim num1, num2, num3 As Double num1 = 3.5 num2 = 6.75 num3 = 1 TruncateSum(num1, num2, num3) ``` Consider the following Sub procedure. ``` Sub TruncateSum(var1 As Double, var2 As Double, var3 As Double) txtBox.Text = CStr(Int(var1 + var2 + var3)) End Sub ``` (A) 10 (B) 12 (C) 0 (D) 11

Computer Science & Information Technology