10 January, 2010

MCSE Self-Paced Training Kit (Exam 70-293): Planning and Maintaining a Microsoft Windows Server 2003 Network Infrastructure, Second Edition

Announcing an all-new MCSA/MCSE Training Kit designed to help maximize your performance on Exam 70-293, a core exam for the new Windows Server 2003 certification. This kit packs the tools and features that exam candidates want mostincluding in-depth, self-paced training based on final exam content; rigorous, objective-by-objective review; exam tips from expert, exam-certified authors; and a robust testing suite. It also provides real-world scenarios, case study examples, and troubleshooting labs for skills and expertise that you can apply to the job.

QUESTION 1
You work as a software developer at Certkiller .com. You develop an application that
includes a Contact Class, which is defined by the following code:
Public Class Contact
Private name As String
Public Event ContactSaved()
Public Property Name()
Get
Return name
End Get
Set(ByVal Value)
name = Value
End Set
End Property
Public Sub Save()
‘Insert Save Code.
RaiseEvent ContactSaved()
End Sub
End Class
You create a form named MainForm. This form must include code to handle the
ContactSaved event raised by the Contact object. The Contact object will be
initialized by a procedure named CreateContact.
Which code segment should you use?
A. Public Class MainForm
Private oContact As New Contact()
Private Sub HandleContactSave()
‘Insert event handling code.
End Sub
Private Sub CreateContact()
oContact.Name = “Certkiller”
oContact.Save()
End Sub
End Class
B. Public Class MainForm
Private WithEvents oContact As New Contact()
Private Sub HandleContactSave()
‘Insert event handling code.
End Sub
Private Sub CreateContact ()
oContact.Name = “Certkiller”
oContact.Save()

Actualtests.org – The Power of Knowing
End Sub
End Class
C. Public Class MainForm
Private WithEvents oContact AsNew Contact()
Private Sub HandleContactSave()
Handles oContact.ContactSaved
‘Insert Event handling code.
End Sub
Private Sub CreateContact ()
oContact.Name = “Certkiller”
oContact.Save()
End Sub
End Class
D. Public Class MainForm
Private WithEvents oContact As New Contact()
Private Sub HandleContactSave() _
Handles oContact.ContactSaved
‘Insert event handling code.
End Sub
Private Sub CreateContact ()
Dim oContact As New Contact()
oContact.Name = “Certkiller”
oContact.Save()
End Sub
End Class
Answer: C
Explanation:
Not D: Public Class Main Form
Private WithEvents oContact As New Contant()
Private Sub HandleContactSave() Handles oContact.ContactSaved
‘Insert event handling code.
End Sub
Private Sub CreateContact()
Dim oContact as New Contact()
oContact.Name = “Certkiller”
oContact.Save()
End Sub
End Class
The problem with this code is that the Class Level oContact that is specified WithEvents,
is hidden by the Method Level variable of the same name inside the CreateContact
procedure. Therefore the save method call will not have any effect as there is no event
handler for the method level variable.
There fore the correct answer is C

Actualtests.org – The Power of Knowing
QUESTION 2
You work as a software developer at Certkiller .com. You create a form in your
Windows-based application. The form contains a command button named
check Certkiller Button. When check Certkiller Button is clicked, the application must
call a procedure named Get Certkiller .
Which two actions should you take? (Each correct answer presents part of the
solution. Choose two)
A. Add arguments to the Get Certkiller declaration to accept System.Object and
System.EventArgs.
B. Add arguments to the check Certkiller Button_Click declaration to accept
System.Object and System.EventArgs.
C. Add code to Get Certkiller to call check Certkiller Button_Click.
D. Add the following code segment at the end of the Get Certkiller declaration:
Handles check Certkiller Button.Click
E. Add the following code segment at the end of the check Certkiller Button_Click
procedure:
Handles Get Certkiller
Answer: A, D
Explanation: Get Certkiller is the name of the method handling the button click.
QUESTION 3
You develop a Windows-based application by using Visual Studio .NET. The
application includes a form named MainForm and a class named Certkiller .
MainForm includes a button named create Certkiller Button. You must ensure that
your application creates an instance of Certkiller when a user clicks this button. You
want to write the most efficient code possible.
Which code segment should you use?
A. Dim con As Certkiller = New Object()
B. Dim con As New Certkiller
C. Dim con As Object
con = New Certkiller ()
D. Dim con As Certkiller
con = New Object()
Answer: B

No comments:

Post a Comment