Beginning Visual Basic Class Final Exam

Multiple Choice (Please select the correct answer from the list.) (100%)

  1. Which of the following is true regarding objects? (e)
  2. An object may have properties.
  3. An object may have methods.
  4. An object may support events.
  5. An object has a well-defined interface
  6. All of the above
  1. Which are the valid file extensions for project, form, and standard modules?(a)
  2. .vbp, .frm, .bas
  3. .prj, .frm, .bas
  4. .prj, .frm, .std
  5. .vbp, .for, .bas
  6. .vbp, .for, .std
  1. A menu item responds to the ? event procedure. ? will be (a)
  2. Click
  3. MenuClick
  4. Item
  5. MenuItem
  6. None of the above
  1. What is the name method to display a pop-up menu? (d)
  2. Menu
  3. Show
  4. Popup
  5. PopupMenu
  6. None of the above
  1. What event occur when the user passes and releases the mouse button? (d)
  2. MousePress, MouseRelease
  3. Up, Down
  4. Press, Release
  5. MouseUp, MouseDown
  6. None of above
  1. Which statements are used to create and destroy a control array instance at run time? (b)
  2. ControlArray
  3. Load, Unload
  4. Create, Destroy
  5. NewInstance, DestroyInstance
  6. CreateControl, UnloadControl
  1. Which of the following methods is supported by the Collection object? (a)
  2. Add
  3. Delete
  4. Change
  5. B and C
  6. A and C
  1. Which statement is used to determine the class name of an object? (c )
  2. ClassName
  3. Type
  4. TypeOf
  5. Class
  6. None of the above
  1. What type of loop is used to examine all members of a collection? (b)
  2. For Collection
  3. For Each
  4. Do
  5. Do Each
  6. Do Collection
  1. Which of the following name of the ADO Data Control property is used to establish a link to a data provider? (b)
  2. DataLink
  3. ConnectionString
  4. ProviderString
  5. ConnectionLink
  6. ProviderLink
  1. What ADO control properties do you set to build a Command object that creates a recordset? (d)
  2. DataCommand, RecordType
  3. Link
  4. Command, Record
  5. CommandType, RecordSource
  6. None of the Above
  1. What properties do you use in VB to create a bound control? (c)
  2. Database, Table, Field
  3. Table, Field
  4. DataSource, DataField
  5. DatabaseName, DataField
  6. AdoRecord, AdoField
  1. Look at the following code

If Button = vbRightButton Then

mnuObjectLine.Checked = False

frmCh2.PopupMenu mnuPopUpLabel

End If

What is the line mnuObjectLine.Checked = False means? (B)

  1. MnuObjectLine is an object and it is launching the method Checked and set to False.
  2. MnuObjectLine is an object and the property Checked is being set as False.
  3. MnuObjectLine is an event and the property Checked is being set as False.
  4. MnuObjectLine is an event and it is launching the method Checked and set to False.
  5. None of the above.
  1. How about the line “frmCh2.PopupMenu mnuPopUpLabel” ? (b)
  2. frmCh2 is an object and PopupMenu is its property and it is launching the method mnuPopUpLabel.
  3. frmCh2 is an object and PopupMenu is its method and it is creating a popup menu using the information in mnuPopUpLabel.
  4. frmCh2.PopupMenu is an object and it is launching the method mnuPopUpLabel.
  5. frmCh2.PopupMenu is an object and it is setting the property mnuPopUpLabel.
  6. None of the above.
  1. Which of the following is a valid Visual Basic collection? (d)
  2. Controls
  3. Windows
  4. Forms
  5. Both a and c
  6. Both b and c
  1. What is the name of the statement used to create an error handler? (b)
  2. Error
  3. On Error
  4. Err
  5. ErrorOccurred
  6. ErrOccurred
  1. When you declare “Private x as Integer” in a Form’s General Declaration section, what do you mean? (c)
  2. Variable x will be not accessible both within or outside of the form module.
  3. Variable x will be accessible outside but not inside of the form module.
  4. Variable x will be accessible inside but not outside of the form module.
  5. Variable x will be accessible both inside and outside of the form module.
  6. None of the above
  1. Same selections as problem 17, how about if you declare “Public x as integer”, what do you mean? (d)
  1. Which of the following statements about a database is true? (d)
  1. A table consists of rows and columns.
  2. The columns in a table are known as records.
  3. We normally use SQL “SELECT” statement to retrieve the records from tables.
  4. A and C
  5. B and C
  1. How do you build an Visual Basic application using ADO DataControl? Which of the following steps do you need to take? (d)

(1)Build Up ADO Connection String Objects

(2)Setup and Pick ADO objects from Microsoft Component Library

(3)Bind ADO Controls with Screen Controls

(4)Build Up ADO Command Objects

The correct sequence would be ?

  1. (1), (2), (3) then (4)
  2. (2), (3), (4) then (1)
  3. (2), (1), (3) then (4)
  4. (2), (1), (4) then (3)
  5. None of above