Visual Basic                                                                                                              Name -

Ch. 12, Worksheet #2

Use the following segments of code to answer the questions below. Note that txtAmount and txtFinal are textboxes.

Private Sub cmdCalculate( )
    Dim A As Integer
    Dim B As Single
    B = 10
    A = B + 9
    Call Taxation(B, A)
    txtAmount = A
    txtFinal = B
End Sub
Private Sub Taxation(X As Single, ByVal Y As Integer)
    Dim C As Integer
    C = 4
    Y = C + 6
    X = 2 * Y
End Sub
  1. Which procedure is an event procedure?
  2.  

  3. Which procedure is a general sub procedure?
  4.  

  5. What is the calling procedure?
  6.  

  7. What is the called procedure?
  8.  

  9. List 2 arguments.
  10.  

  11. What argument is passed by reference?
  12.  

  13. What argument is passed by value?
  14.  

  15. Name a local variable of the procedure Taxation.
  16.  

  17. Write the header of the procedure cmdCalculate.
  18.  

  19. Write the parameter list of the procedure Taxation.
  20.  

  21. What value will be printed in the textbox txtAmount?
  22.  

  23. What value will be printed in the textbox txtFinal?