Exam 3: Using Variables and Constants

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

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

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

The Convert class contains methods that return the result of converting a value to a specified data type.They are used to convert a number (rather than a string)from one data type to another.The Convert class methods are also used because they can be used in any of the languages built into Visual Studio.The conversion functions can only be used in the Visual Basic language.

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.

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

Dim decItemPrice As Decimal
Dim intQuantity As Integer
Decimal.TryParse(txtItemPrice.Text,decItemPrice)
Integer.TryParse(txtQuantity.Text,intQuantity)

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

Free
(Multiple Choice)
4.8/5
(35)
Correct Answer:
Verified

A

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

(Multiple Choice)
4.9/5
(36)

Object and String variables are automatically initialized using ____.

(Multiple Choice)
4.9/5
(38)

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.

(Short Answer)
4.7/5
(41)

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

(Multiple Choice)
4.8/5
(39)

Date variables are automatically set to which value when created?

(Multiple Choice)
4.8/5
(34)

You use the ____ operator to concatenate strings together.

(Multiple Choice)
4.8/5
(38)

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

(Multiple Choice)
4.8/5
(29)

A variable declared in the Declaration section of a form is called a procedure-level variable.

(True/False)
4.9/5
(24)

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

(Multiple Choice)
4.8/5
(40)

The strFirstName and strLastName variables contain the strings "Jane" and "Jones",respectively.Which of the following statements will display a string as "Jones,Jane" (the last name,a comma,a space,and the first name)in the lblFullName control?

(Multiple Choice)
4.8/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.

(Short Answer)
4.8/5
(37)

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

(Multiple Choice)
4.9/5
(40)

A local gym needs an application to apply a 10% discount for all new members who present a coupon during enrollment.Write the statements to declare a variable to record if a customer has a coupon,and to assign the discount rate.The discount rate will not change while the application is running.

(Short Answer)
4.8/5
(44)

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

(Multiple Choice)
4.8/5
(33)

A control's ____ event occurs when a change is made to the contents of a control's Text property.

(Multiple Choice)
4.8/5
(40)

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.

(Short Answer)
4.8/5
(39)

The line continuation character is a(n)____.

(Multiple Choice)
4.8/5
(42)
Showing 1 - 20 of 60
close modal

Filters

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