Exam 3: Using Variables and Constants

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Problems - Correcting Code Errors The following sample of code contains errors. Rewrite the incorrect statements to correct all errors. Dim strPROMPT As String = "Please enter an employee code:" Const strTITLE As String = Employee Data 'assign the code to a variable strCode = InputBox(strTITLE, strPROMPT)

Free
(Essay)
4.9/5
(31)
Correct Answer:
Verified

Const strPROMPT As String = "Please enter an employee code:"
Const strTITLE As String = "Employee Data"
strCode = InputBox(strPROMPT, strTITLE)

A memory variable that is a Double data type requires ____ bytes of storage.

Free
(Multiple Choice)
4.9/5
(38)
Correct Answer:
Verified

D

What is a TextChanged event? How can it be used within an application?

Free
(Essay)
4.8/5
(32)
Correct Answer:
Verified

A control's TextChanged event occurs when a change is made to the contents of the control's Text property. This can happen as a result of either the user entering data into the control, or the application's code assigning data to the control's Text property. It can be used to clear the contents of controls when the user changes a value of another control.

Case-Based Critical Thinking Questions Case 1 - PetPals You have been hired by PetPals Veterinary Clinic to modify an application. The application is used to enter and save all patient (pet) information obtained during an office visit. The data entered by the users is currently stored in properties of controls of the form. Your first task to improve the application is to ____.

(Multiple Choice)
4.9/5
(37)

The decBalance variable contains the number 1368.52. Write the assignment statement to display the value with a dollar sign, a thousands separator, and two decimal places in the lblBalance control.

(Essay)
5.0/5
(34)

Which of the following statements formats the contents of the dblPay variable with a dollar sign and no decimal places?

(Multiple Choice)
4.8/5
(35)

When a button is selected, the computer processes the code contained in the button's ____ event procedure.

(Multiple Choice)
4.8/5
(32)

You declare a class-level variable using the ____ keyword.

(Multiple Choice)
4.7/5
(28)

Case-Based Critical Thinking Questions Case 1 - PetPals You have been hired by PetPals Veterinary Clinic to modify an application. The application is used to enter and save all patient (pet) information obtained during an office visit. The veterinarian wants to document and display the name of the technician who performs the initial evaluation of the pet. You decide to use an InputBox function to prompt the user to enter this data first. The InputBox function should be coded in the ____.

(Multiple Choice)
4.7/5
(38)

The ____ clause in an event procedure's header indicates the object and event associated with the procedure.

(Multiple Choice)
4.8/5
(39)

A variable that was not assigned a specific data type is assigned the ____ data type.

(Multiple Choice)
4.9/5
(40)

You can eliminate the problems that occur as a result of implicit type conversions by entering the Option Explicit On statement in the General Declarations section of the Code Editor window.

(True/False)
4.8/5
(43)

A Boolean variable is initialized to the value True if no initial value is stated when the variable is declared.

(True/False)
5.0/5
(34)

The line continuation character is a(n) ____.

(Multiple Choice)
4.9/5
(39)

You use the ____ operator to concatenate strings together.

(Multiple Choice)
4.8/5
(36)

The Decimal, Double, and Single variable data types can all store what type of numeric data?  Explain the differences among these three data types and problems that can occur with their use.

(Essay)
4.7/5
(33)

If Option Strict is set to On, which of the following statements will assign the contents of the txtLateFee control to a Decimal variable named decLateFee ?

(Multiple Choice)
4.8/5
(35)

Calculations involving Decimal variables are not subject to the small rounding errors that may occur when using Double or Single variables.

(True/False)
4.8/5
(32)

Case-Based Critical Thinking Questions Case 1 - PetPals You have been hired by PetPals Veterinary Clinic to modify an application. The application is used to enter and save all patient (pet) information obtained during an office visit. The pet's temperature is recorded at every visit, and it may contain a decimal place. What data type is best for storing this data?

(Multiple Choice)
4.9/5
(27)

A named constant's value cannot be changed while the application is running.

(True/False)
4.9/5
(40)
Showing 1 - 20 of 60
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)