Filters
Question type

Study Flashcards

A procedure in an application needs to store tax rate data. The county of residence and the tax rate need to be stored. Write the appropriate Dim statements to declare the variables. Write an assignment statement that assigns .08 to the tax rate variable.

Correct Answer

verifed

verified

Dim strCounty As Str...

View Answer

Which of the following can store a number containing a decimal place?


A) Single
B) Long
C) String
D) Integer

E) C) and D)
F) B) and C)

Correct Answer

verifed

verified

Write a statement to display an input dialog box that shows "Car Make:" as the prompt, "Car" in the title bar, and an empty input area. When the user closes the dialog box, the assignment statement assigns the function's return value to the strCar variable.

Correct Answer

verifed

verified

strCar = I...

View Answer

You cannot associate a procedure with more than one object or event.

A) True
B) False

Correct Answer

verifed

verified

When using the Visual Basic 2015 InputBox function, which of the following is the Windows standard?


A) sentence capitalization for both the prompt and the title
B) book title capitalization for the title and sentence capitalization for the prompt
C) book title capitalization for both the prompt and the title
D) Pascal case for both the prompt and the title

E) A) and B)
F) All of the above

Correct Answer

verifed

verified

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 account number for each pet must be available to be used by all procedures in the form. You should make sure the account number is declared using the ____ keyword.


A) Public
B) Dim
C) Private
D) Val

E) B) and C)
F) A) and B)

Correct Answer

verifed

verified

What is a static variable? How is it different from a class-level variable?

Correct Answer

verifed

verified

A static variable is a procedure-level v...

View Answer

What are the Convert class methods and why are they sometimes used instead of conversion functions?

Correct Answer

verifed

verified

The Convert class contains methods that ...

View Answer

Specifying the number of decimal places and the special characters to display in a number is called ____.


A) formatting
B) concatenating
C) shredding
D) designing

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

An application translates English words into French words and displays the results as a message in a Label control. The strEnglish variable contains the string "apple". The strFrench variable contains the string "pomme". Write an assignment statement to display the string "The French word for apple is pomme." in the lblMessage control.

Correct Answer

verifed

verified

lblMessage.Text = "T...

View Answer

An application allows a user to enter an item price and a quantity to be used in a calculation. The item price may contain a decimal place, and the quantity will always be a whole number. Write the appropriate Dim statements to declare the variables. Write the related statements needed to convert the strings entered by the user into numeric data types.

Correct Answer

verifed

verified

Dim decItemPrice As Decimal
D...

View Answer

A default button is identified by setting the form's ____ property.


A) AcceptButton
B) DefaultButton
C) SelectedButton
D) CancelButton

E) B) and D)
F) C) and D)

Correct Answer

verifed

verified

A procedure in an application needs to store student data. The student first name, student last name, student GPA, and whether or not the student is registered all need to be stored. Write the appropriate Dim statements to declare the variables. Make sure to use appropriate naming conventions.

Correct Answer

verifed

verified

Dim strFirstName As String
Di...

View Answer

Which of the following statements declares a class-level variable?


A) Private Dim dblHeight As Double
B) Dim dblHeight As Double
C) Class dblHeight As Double
D) Private dblHeight As Double

E) B) and C)
F) None of the above

Correct Answer

verifed

verified

A procedure in an application needs to store data used to calculate the total price of purchasing tires. The price of the tires will contain a decimal place. The number of tires will always be a whole number. Write the appropriate Dim statements to declare the variables. Make sure to use appropriate naming conventions.

Correct Answer

verifed

verified

Dim decPri...

View Answer

A variable name must begin with a letter or a(n) ____.


A) ampersand (&)
B) percent sign (%)
C) exclamation mark (!)
D) underscore (_)

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

The decRate variable contains the number .03. Write the assignment statement to display the value as 3% in the lblRate control.

Correct Answer

verifed

verified

lblRate.Te...

View Answer

Explain the scope and lifetime of variables. How are a variable's scope and lifetime determined? List the three scopes available for a variable.

Correct Answer

verifed

verified

Every variable has a scope and a lifetim...

View Answer

A form's CancelButton property specifies the button whose Click event procedure is processed when the user presses the ____ key.


A) Enter
B) Shift
C) Tab
D) Esc

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

Object and String variables are automatically initialized using ____.


A) spaces
B) the keyword Nothing (no data at all)
C) the word "Nothing"
D) 0

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

Showing 41 - 60 of 60

Related Exams

Show Answer