• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/24

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

24 Cards in this Set

  • Front
  • Back
You are design a VB application that will facilitate the billing process for hospitals. The billing calculations performed by the application are based on laws that are likely to change in the future. When these laws change, you will need an easy way to make modifications to your application. You want to ensure that changes to the billing algorithm will not force you to recompile the entire application. You do not want to redistribute the application. How should you design this application?
a) place all of the billing logic in COM components that reside on a central server.
b) place all of the billing logic in a separate code module and only recompile this module when the billing logic changes.
c) use conditional compilation statements to control which code segments should be executed
d) Build an ActiveX Control that implements business logic. Change the progid and the clsid of the control when the billing logic is modified.
a) place all of the billing logic in COM components that reside on a central server.
You and several other developers are working on a large Visual Basic project. The project team is using Microsoft Visual SourceSafe(VSS) for source code control. You make major Changes to one component within the project. You want to share these changes with other developers on the team while minimizing the risk of causing errors for these other developers. How should you do this?
a) Check out all components from VSS database. Test your new version with these components, If the project passes the tests, check your new version into The VSS database.
b) Check your new version into the VSS database. Send e-mail advising all other Developers on the team to get the new version of the component
c) Check your new version into the VSS database. Get the latest version of all components from VSS database. Test your new version with these components. If the project fails the tests, Undo your check-in.
d) Get the latest version of all components from VSS database. Test your New version with these components. If the project passes the tests, check your new version into the VSS database.
d) Get the latest version of all components from VSS database. Test your New version with these components. If the project passes the tests, check your new version into the VSS database.
You are placing a Toolbar control on your VB form. You want to specify a different action for each toolbar button. Which select case statement should you use in the buttonclick event handler to specify each action?
a) select case button.click
b) select case button.key
c) select case button.item
d) select case button.index
b) select case button.key
Each client contains a reference to the CCVerify component, which exposes a notify interface for this class. To enable this communication, a reference to notify must be passed from your application to CCverify. You must use the register method of CCverify to do this. Which code segment should be used to implement the register method in the CCverify component?
a) private pNotify As Notify
sub register(oNotify as notify)
set pNotify=oNotify
end sub
b) private pNotify As object
sub register(oNotify as object)
set pNotify=oNotify
end sub
c) private pNotify As object
sub register(oNotify as notify)
set pNotify=oNotify
end sub
d) private pNotify As Notify
sub register(oNotify as object)
set pNotify=oNotify
end sub
a) private pNotify As Notify
sub register(oNotify as notify)
set pNotify=oNotify
end sub
You create a COM DLL project named University and included two class modules named Student and Course. The Student class module has a method named GetID, instances of the Course class need to call the GetID method. However, you do not want any code outside of the project to be able to call the GetID method. How should you declare GetID?
a) Public Function GetID() As Long
b) Friend Function GetID() As Long
c) Private Function GetID() As Long
d) Static Function GetID() As Long
b) Friend Function GetID() As Long
Your VB application includes a menu to display several options. This menu is configured as shown in the menu editor dialog box in the exhibit you want the menu to display a check mark in front of each option the first time the user selects it, and to toggle the check mark off and on for susequent selections. Which code fragment will toggle the display of the check mark on this menu when any of the three options is selected?
a) if mnuoption(2).checked=true then
mnuoption(2).checked=false
else
mnuoption(2).checked=true
end if
b) mnuoption.item(index).checked=Not mnuoption.item(index).checked
c) mnuoption.checked=not mnuoption.checked
d) mnuoption.item(index)=Not mnuoption.item(index)
b) mnuoption.item(index).checked=Not mnuoption.item(index).checked
You have a ListBox control named lstCandidates on your Visual Basic form. When a user selects a name from the listbox you want the name to appear in a text box named txtName Which event procedure will achieve this?
a) Private Sub lstCandidates_Click()
TxtName = lstCandidates
End Sub
b) Private Sub lstcandidates_Click()
TxtName.Value = lstcandidates.Value
End Sub
c) Private Sub lstCandidates_ItemCheck(Item As Integer)
TxtName = lstCandidates.ItemData
End Sub
d) Private Sub lstCandidates_ ItemCheck(Item As Integer)
TxtName Text = lstcandidates. ItemData
End Sub
a) Private Sub lstCandidates_Click()
TxtName = lstCandidates
End Sub
Which code snippet will return all settings from the Windows Registry
related to the "Test" application's "Colors" key?
a) Dim myVar As Variant
Dim myStr As String
For Each myVar In AllSettings
MyStr = GetSetting (appname := "Test", section := "Colors")
Next
b) Dim myVar As Variant
Dim myStr As String
For Each myVar In AllSettings
MyStr = Get (appname := "Test", section := "Colors")
Next
c) Dim myVar () As Variant
MyVar = GetAllSettings(appname := "Test", section := "Colors")
d) Dim myVar As Variant
MyVar = GetAllSettings(appname := "Test", section := "Colors")
d) Dim myVar As Variant
MyVar = GetAllSettings(appname := "Test", section := "Colors")
You are implementing a VB application. You add a number of controls to form. You want to associate a tooltip with each of these controls. How can you allow the display of tooltip information for controls in your application?
a) set the Tooltiptext property of each control to a string value that will be displayed as the tooltip.
b) set the whatsthishelpid property of each control to the Id of the tooltip string.
c) set the helpcontextid property of each control to the Id of the tooltip srting.
d) set the linktopic property of each control to a string value that will be displayed as the tooltip.
a) set the Tooltiptext property of each control to a string value that will be displayed as the tooltip.
You want to create a Visual Basic class. You want each instance of the class to represent a record in a database table. How can you accomplish this?
a) Create a new Visual Basic project based on the Data Project template. Set the ConnectionSource property of the DataEnviron object to refer to the Appropriate DSN.
b) Create a class module that queries the desired table in the database. Provide a property Get method for each field in the table.
c) Run the Visual Data Manager Add-In. Select the correct database and table use the Copy Structure command to generate the wrapper class.
d) Create a new ADO Recordset object. When the Execute method of the ADO Recordset object is invoked, supply the table name as the CommandString argument and adCmdTable as the Option argument.
d) Create a new ADO Recordset object. When the Execute method of the ADO Recordset object is invoked, supply the table name as the CommandString argument and adCmdTable as the Option argument.
Cindy has been instructed her to copy the current Visual Basic project files and ActiveX controls from the network to a new computer at her desk. After the files have been copied, she installs and runs Visual Basic. However, when she opens one of the projects, she gets an error message stating that one of the third-party ActiveX controls could not be loaded. What must Cindy do to add the control to her project?
a)She must browse for the control from the References dialog box and select the control's check box.
b) She must browse for the control from within the Components dialog box, select the control and click Open.
c) She must first register the control using Regsvr32.exe. She must then select the control's check box from within the References dialog box.
d) She must first register the control using Regsvr32.exe. She must then select the control's check box from within the Components dialog box.
b) She must browse for the control from within the Components dialog box, select the control and click Open.
Which two characteristics of the services should influence you to implement them as out-of-process COM components? (choose two)
a) The service involves lengthy calculations or report generation
b) The service requires frequent interaction with the user
c) The service is memory intensive and frequently used in the application
d) The service might cause the application to crash when an unhandled exception occurs within the service
e) The service involves database operations or other transaction-oriented tasks
a) The service involves lengthy calculations or report generation
d) The service might cause the application to crash when an unhandled exception occurs within the service
You are deploying a VB application that connects to a SQL Server database using ODBC. Which option best describes the configuration of ODBC drivers?
a) The ODBC driver only needs to be installed on the server.
b) An ODBC driver needs to be installed on each client only
c) An ODBC driver needs to be installed on each client and the Server
d) ODBC drivers need to be installed on all NT clients only
b) An ODBC driver needs to be installed on each client only
What properties need to be set to bind a text box control to an ADO data control?
a) DataSource and DataField
b) DataSource, DataField, and DataMember
c) DataSource, RecordSource, and DataField
d) DataSource, Connection, and DataField
a) DataSource and DataField
You use VB to create a form named frmTrack for tracking invoices. You want to create a new instance of frmTrack. Which code fragment will create a new instance of frmTrack?
a) Dim x as new frmtrack
x.show
b) Dim frmtrach as new form
frmtrack.show
c) Dim x as form
set x=frmtrack
x. show
d) Dim x as new form
set x=frmtrack
x. show
a) Dim x as new frmtrack
x.show
You want to make it easy for developers to create new projects that automatically contain these components. You create a new project on your computer. You add the control to the toolbox. You then add the form to the project. What should you do next?
a) Save the project as standard.vbp. Copy the vb.ini file from your computer to each developer's computer.
b) Save the project as standard.vbp. Copy the project from your computer to each developer's computer as a custom template.
c) Save the project as standard.vbp. Replace the standard EXE project on each deveploer's computer with a copy of the project from your computer.
d)Check the project into MS visual sourcesafe. check out the project from each developer's computer.
d)Check the project into MS visual sourcesafe. check out the project from each developer's computer.
You create a multiuser Visual Basic application that interacts with a database. You are using ADO and need an updateable, disconnected recordset. You need to offer users the ability to add, update, and modify records. What must you do to accomplish this?
a) Set the CursorType property to adOpenStatic, and set the LockType property to adLockBatchoptimistic.
b) Set the CursorType property to adopenDynamic, and set the LockType property to adLockPessimistic.
c) Set the CursorType property to adopenDynamic, and set the LockType property to adLockOptimistic.
d) Set the CursorType property to adopenStatic, and set the LockType property to adLockOptimistic.
a) Set the CursorType property to adOpenStatic, and set the LockType property to adLockBatchoptimistic.
You create a VB application that uses the MS IE object model. You include the following code in the general declarations section of a form-level module.
private olE as New InternetExplorer
When will vb instantiate this object?
a) when the form is loaded
b) when the form is displayed on the screen
c) when the declaration is executed
d) when the object is first referenced in your code
d) when the object is first referenced in your code
You VB application uses ADO to interact with a relational database. Users require the ability to update and browse records. You have an existing connection object named cndevserver and recordset object named rscustomers. You want to create a recordset. Which code fragment should you use?
a) rscustomers.Open "Select * From tblcustomers", cndevserver, adOpenDynamic, adLockOptimistic
b) Set rscustomers = cndevserver.Execute "Select * From tblcustomers", adOpenDynamic
c) rscustomers.Open("Select * From tblcustomers", cndevserver, adOpenDynamic)
d) Set rscustomers = cndevserver.Execute("Select * From tblcustomers", adOpenKeySet)
a) rscustomers.Open "Select * From tblcustomers", cndevserver, adOpenDynamic, adLockOptimistic
Within a VB procedure, you write error handling code to specifically trap and react to error number 31001, You need to test the effectiveness of the error handling. Which line of code will simulate error 31001?
a) Err.Raise 31001
b) Debug.Assert 31001
c) Err.Raise "31001"
d) Debug.Assert "31001"
a) Err.Raise 31001
The Caller is notified asynchronously when the operation actually completes a caller of the AddCourse method defines a variable of type Courses. The Variable is named collegecourses. Which code fragment must a caller use to define collegecourses?
a) Dim collegecourses As Courses
b) Public collegecourses As New Courses
c) Dim WithEvents collegecourses As Courses
d) Public collegecourses As Courses.
c) Dim WithEvents collegecourses As Courses
You decide to encapsulate the business logic into a COM EXE named HRManager.exe. Within the user interface portion of your application, you want to create an instance of the Employee object exposed by HRManager.exe. Which two code fragments will instantiate an Employee object variable? (choose two)
a) set oEmployee= New HRManager.Employee
b) set oEmployee= Createobject( "HRManager.Employee")
c) set oEmployee= getobject ("",HRManager.Employee)
d) set oEmployee= getobject(,HRManager.Employee)
a) set oEmployee= New HRManager.Employee
b) set oEmployee= Createobject( "HRManager.Employee")
You use VB to create a COM DLL project named university. In this project you implement a class module named teacher. The teacher class module has a property named salary. This property must be accessible only from within the teacher class. How should you declare the property?
a) Public property get salary() as long
b) Private property get salary() as long
c) Static property get salary() as long
d) Friend property get salary() as long
b) Private property get salary() as long
Your VB form contains a text box used to enter phone numbers. You are writing code to validate each keystroke to make sure that only numbers are being entered. If a letter is entered, you want to display a warning dialog box and prevent the appearance of the letter in the text box. In which control event must you write this code?
a) keypress
b) validate
c) change
d) lostfocus
a) keypress