1. Question: Certkiller.com wants you to develop an application that handles passes for Certkiller
    .com's parking lot.
    The application has to store and retrieve vehicle information in a contiguous list that allows for advanced
    navigation techniques.
    You have already written and executed the following code:
    Dim v1 As Vehicle, v2 As Vehicle, v3 As Vehicle, v4 As Vehicle, v5 As Vehicle
    v1 = New Vehicle("1M2567871Y91234574", "Nissan Silvia", 1996)
    v2 = New Vehicle("1H2569122493456960", "Honda Civic", 1999)
    v3 = New Vehicle("1F2569106891234589", "Mitsubishi Lancer", 2001)
    v4 = New Vehicle("1F7969122491234589", "Mazda MX7", 1998)
    v5 = New Vehicle("1T2569122493456123", "Toyota Supra", 2000)
    LinkedList <Vehicle> vList = new LinkedList < Vehicle > ();
    LinkedListNode < Vehicle > vNode;
    vNode = vList.AddFirst (v1);
    vNode = vList.AddLast (v2);
    vNode = vList.AddAfter (vNode, v3);
    vNode = vList.AddBefore (vNode, v4);
    vList.AddLast (v5);
    foreach (Vehicle v in vList)
    {
    Console.WriteLine ("{0} {1} ({2})", v.MakeModel, v.Year, v.Vin);
    }
    What is the right output? -(VB.NET)

    A
    Nissan Silvia 1996 (1M2567871Y91234574)
    Honda Civic 1999 (1H2569122493456960)
    Mitsubishi Lancer 2001 (1F2569106891234589)
    Mazda MX7 1998 (1F7969122491234589)
    Toyota Supra 2000 (1T2569122493456123)

    B
    Nissan Silvia 1996 (1M2567871Y91234574)
    Mazda MX7 1998 (1F7969122491234589)
    Mitsubishi Lancer 2001 (1F2569106891234589)
    Honda Civic 1999 (1H2569122493456960)
    Toyota Supra 2000 (1T2569122493456123)

    C
    Nissan Silvia 1996 (1M2567871Y91234574)
    Mazda MX7 1998 (1F7969122491234589)
    Mitsubishi Lancer 2001 (1F2569106891234589)
    Toyota Corolla 2002 (1T2569122493456123)
    Honda Civic 1999 (1H2569122493456960)

    D
    Nissan Silvia 1996 (1M2567871Y91234574)
    Mitsubishi Lancer 2001 (1F2569106891234589)
    Mazda MX7 1998 (1F7969122491234589)
    Honda Civic 1999 (1H2569122493456960)
    Toyota Supra 2000 (1T2569122493456123)

    Note: Not available
    1. Report
  2. Question: You work as an application developer at Certkiller .com. You are developing a collection
    class named ClientCollection, which is to be used for storing the names of Certkiller.com's clients that are
    situated in various geographical areas.
    These client names are represented by the Client class.
    You are planning to create a method named SortClients in the ClientCollection class to arrange Client
    objects in ascending order.
    You need to ensure that the appropriate interface is implemented by the Client class to allow sorting.
    What interface should be used? -(VB.NET)

    A
    IDictionary

    B
    IComparable

    C
    IComparer

    D
    IEqualityComparer

    Note: Not available
    1. Report
  3. Question: You have been given the responsibility of creating a class named CalcSalary that will
    determine the salaries of Certkiller .com's staff. The CalcSalary class includes methods to increment and
    decrement staff salaries. You would like to invoke the IncrementSalary and DecrementSalary methods
    dynamically at runtime from the sales manager application when needed. You decide to use the Salary
    delegate to invoke these methods.
    Public Delegate Function Salary(Emp As Employee, Amount As Double) As Boolean
    Public Class CalcSalary
    ' for promotions
    End Class -(VB.NET)

    A
    Public Sub Review(emp As Employee, amount As Double)
    Dim salaryDel As Salary
    If emp.Status = QuarterlyReview.OnTarget OrElse emp.Status =
    QuarterlyReview.AboveGoals Then
    salaryDel.Invoke(CalcSalary.IncrementSalary(emp, amount))
    Else
    salaryDel.Invoke(CalcSalary.DecrementSalary(emp, amount))
    End If
    End Sub

    B
    Public Sub Review(emp As Employee, amount As Double)
    Dim salaryDel As Salary
    If emp.Status = QuarterlyReview.OnTarget OrElse emp.Status =
    QuarterlyReview.AboveGoals Then
    salaryDel.Method = CalcSalary.IncrementSalary
    Else
    salaryDel.Method = CalcSalary.DecrementSalary
    End If
    salaryDel.Invoke(emp, amount)
    End Sub

    C
    Public Sub Review(emp As Employee, amount As Double)
    Dim salaryDel As Salary
    If emp.Status = QuarterlyReview.OnTarget OrElse emp.Status =
    QuarterlyReview.AboveGoals Then
    salaryDel.IncrementSalary(emp, amount)
    Else
    salaryDel.DecrementSalary(emp, amount)
    End If
    End Sub

    D
    Public Sub Review(emp As Employee, amount As Double)
    Dim salaryDel As Salary
    If emp.Status = QuarterlyReview.OnTarget OrElse emp.Status =
    QuarterlyReview.AboveGoals Then
    salaryDel = CalcSalary.IncrementSalary
    Else
    salaryDel = CalcSalary.DecrementSalary
    End If
    salaryDel.Invoke(emp, amount)
    End Sub

    Note: Not available
    1. Report
  4. Question: You have been given the responsibility of creating a class named CalcSalary that will
    determine the salaries of Certkiller .com's staff. The CalcSalary class includes methods to increment and
    decrement staff salaries. The following code is included in the CalcSalary class:
    Public Class CalcSalary
    ' for promotions
    Public Shared Function IncrementSalary(Emp As Employee, Amount As Double) As Boolean
    If Emp.Status = QuarterlyReview.AboveGoals Then
    Emp.Salary += Amount
    End If
    Return True
    End Function
    End Class - (VB.NET)

    A
    Public Delegate Function Salary(Emp As Employee, Amount As Double) As Boolean

    B
    Public Function Salary(Emp As Employee, Amount As Double) As Boolean End Function

    C
    Public Event Salary (Employee Emp, double Amount) As Boolean

    D
    Public Delegate Sub Salary(Emp As Employee, Amount As Double)

    Note: Not available
    1. Report
  5. Question: You use Reflection to obtain information about a method named MyMethod. You need to
    ascertain whether MyMethod is accessible to a derived class. What should you do? -(VB.NET)

    A
    Call the IsAssembly property of the MethodInfo class.

    B
    Call the IsVirtual property of the MethodInfo class.

    C
    Call the IsStatic property of the MethodInfo class.

    D
    Call the IsFamily property of the MethodInfo class.

    Note: Not available
    1. Report
  6. Question: You are creating a class that uses unmanaged resources. This class maintains references
    to managed resources on other objects. You need to ensure that users of this class can explicitly release
    resources when the class instance ceases to be needed. Which three actions should you perform? (Each
    correct answer presents part of the solution. Choose three.) -(VB.NET)

    A
    Define the class such that it inherits from the WeakReference class.

    B
    Define the class such that it implements the IDisposable interface.

    C
    Create a class destructor that calls methods on other objects to release the managed resources.

    D
    Create a class destructor that releases the unmanaged resources.

    E
    Create a Dispose method that calls System.GC.Collect to force garbage collection.

    F
    Create a Dispose method that releases unmanaged resources and calls methods on other
    objects to release the managed resources.

    Note: Not available
    1. Report
  7. Question: You need to select a class that is optimized for key-based item retrieval from both small
    and large collections. Which class should you choose? -(VB.NET)

    A
    OrderedDictionary class

    B
    HybridDictionary class

    C
    ListDictionary class

    D
    Hashtable class

    Note: Not available
    1. Report
  8. Question: You need to identify a type that meets the following criteria: Is always a number. Is not
    greater than 65,535. Which type should you choose? - (VB.NET)

    A
    System.UInt16

    B
    int

    C
    System.String

    D
    System.IntPtr

    Note: Not available
    1. Report
  9. Question: You are developing a custom-collection class. You need to create a method in your class.
    You need to ensure that the method you create in your class returns a type that is compatible with the
    Foreach statement. Which criterion should the method meet? - (VB.NET)

    A
    The method must return a type of either IEnumerator or IEnumerable.

    B
    The method must return a type of IComparable.

    C
    The method must explicitly contain a collection.

    D
    The method must be the only iterator in the class.

    Note: Not available
    1. Report
  10. Question: You are developing a custom event handler to automatically print all open documents.
    The event handler helps specify the number of copies to be printed. You need to develop a custom event
    arguments class to pass as a parameter to the event handler. Which code segment should you use? - (VB.NET)

    A
    Public Class PrintingArgs
    Private m_copies As Integer
    Public Sub New(numberOfCopies As Integer)
    Me.m_copies = numberOfCopies
    End Sub
    Public ReadOnly Property Copies() As Integer
    Get
    Return Me.m_copies
    End Get
    End Property
    End Class

    B
    Public Class PrintingArgs
    Inherits EventArgs
    Private m_copies As Integer
    Public Sub New(numberOfCopies As Integer)
    Me.m_copies = numberOfCopies
    End Sub
    Public ReadOnly Property Copies() As Integer
    Get
    Return Me.m_copies
    End Get
    End Property
    End Class

    C
    Public Class PrintingArgs
    Private eventArgs As EventArgs
    Public Sub New(ea As EventArgs)
    Me.eventArgs = ea
    End Sub
    Public ReadOnly Property Args() As EventArgs
    Get
    Return eventArgs
    End Get
    End Property
    End Class

    D
    Public Class PrintingArgs
    Inherits EventArgs
    Private copies As Integer
    End Class

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd