MIS 312--Chapter 8

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Which of the following is false?

The name of each argument in the Call statement should be identical to the name of its corresponding parameter in the receiving procedure's parameterList.

Which of the following is false?

To pass a variable by reference in Visual Basic, you include the keyword ByRef before the variable's name in the Call statement.

An event procedure is a Sub procedure that is associated with a specific object and event.

True

Which of the following converts the sender parameter to the Label data type, assigning the result to a Label variable named currentLabel?

currentLabel = TryCast(sender, Label)

A function can return ______.

one value only

To determine whether a variable is being passed to a procedure by value or by reference, you will need to examine _____.

the procedure header

Which of the following invokes the Calc procedure passing it an Integer variable named sales and a Double variable name bonus?

Call Calc(sales, bonus)

Which of the following invokes the CalcArea Sub procedure, passing it two variables by value?

Call CalcArea(length, width)

Which of the following statements should you use to call the CalcEnd procedure described in Review Questions?

Call CalcEnd(begin, sales, purchases, ending)

Which of the following invokes the DisplayMessage procedure?

Call DisplayMessage()

To turn on a timer, you set its _____ property to True.

Enabled

Which of the following associates a procedure with the TextChanged events of the nameTextbox and salesTextbox?

Handles nameTextbox.TextChanged, salesTextBox.TextChanged

Which of the following headers indicates that the procedure returns a Decimal number?

Private Function Calc() As Decimal

Which of the following indicates that the procedure will receive two items of data: an integer and the address of a Double variable?

Private Sub Calc(ByVal x As Integer, ByRef y As Double)

A Sub procedure named CalcEnd is passed four Integer variables name begin, sales, purchases, and ending. The procedure should calculate the ending inventory using the beginning inventory, sales, and purchase amounts passed to the procedure. The result should be stored in the ending variable. Which of the following procedure headers is correct?

Private Sub CalcEnd(ByVal b As Integer, ByVal s As Integer, ByVal p As Integer, ByRef final As Integer)

Which of the following is a valid header for a procedure that receives the value stored in an Integer variable first, and the address of a Decimal variable second?

Private Sub CalcFee(ByVal base As Integer, ByRef rate As Decimal)

Which of the following is a valid header for a procedure that receives an integer followed by a number with a decimal place?

Private Sub CalcFee(ByVal base As Integer, ByVal rate As Decimal)

Which of the following indicates that the procedure should be processed when the user clicks either the firstCheckBox or the secondCheckBox?

Private Sub Clear(sender As Object, e As EventArgs) Handles firstCheckBox.Click, secondCheckBox.Click

Which of the following indicates that the procedure receives a copy of the values stored in two String variables?

Private Sub Display(ByVal x As String, ByVal y As String)

Which of the following is the correct way to write a procedure header that does not require a parameterList?

Private Sub DisplayMessage()

Which of the following instructs a function to return the contents of the stateTax variable?

Return stateTax


Ensembles d'études connexes

History - The Great Steppe in the period of Ulug Ulus and the Kazakh Khanate

View Set

Organizational Behavior CH 1, 3 & 4

View Set

CHAPTER 16 SLEEP DISORDERS AND TREATMENT

View Set

Complementary and Integrative Health

View Set

Chapter 47: Management of Patients With Intestinal and Rectal Disorders, Prep U--Ch. 47: Mgmt of Patients With Intestinal and Rectal Disorders

View Set