1. Question: You need to decode a file encoded in ASCII. Which of the following decoding types would yield correct results? (Choose all that apply.) - VB.NET

    A
    Encoding.UTF32

    B
    Encoding.UTF16

    C
    Encoding.UTF8

    D
    Encoding.UTF7

    Note: Not available
    1. Report
  2. Question: You are writing an application that generates summary reports nightly. These reports will be viewed by executives in your Korea office and must contain Korean characters. Which of the following encoding types is the best one to use? - VB.NET

    A
    iso-2022-kr

    B
    x-EBCDIC-KoreanExtended

    C
    x-mac-korean

    D
    UTF-16

    Note: Not available
    1. Report
  3. Question: You create an instance of the Stack class. After adding several integers to it, you need to remove all objects from the Stack. Which method should you call? - VB.NET

    A
    Stack.Pop

    B
    Stack.Push

    C
    Stack.Clear

    D
    Stack.Peek

    Note: Not available
    1. Report
  4. Question: You need to create a collection to act as a shopping cart. The collection will store multiple instances of your custom class, ShoppingCartItem. You need to be able to sort the items according to price and time added to the shopping cart (both properties of the ShoppingCartItem). Which class should you use for the shopping cart? - VB.NET

    A
    Queue

    B
    ArrayList

    C
    Stack

    D
    StringCollection

    Note: Not available
    1. Report
  5. Question: You create an ArrayList object and add 200 instances of your custom class, Product. When you call ArrayList.Sort, you receive an InvalidOperationException. How should you resolve the problem? (Choose two. Each answer forms part of the complete solution.) - VB.NET

    A
    Implement the IComparable interface.

    B
    Create a method named CompareTo.

    C
    Implement the IEnumerable interface.

    D
    Create a method named GetEnumerator.

    Note: Not available
    1. Report
  6. Question: You are creating a collection that will act as a database transaction log. You need to be able to add instances of your custom class, DBTransaction, to the collection. If an error occurs, you need to be able to access the most recently added instance of DBTransaction and remove it from the collection. The collection must be strongly typed. Which class should you use? - VB.NET

    A
    HashTable

    B
    SortedList

    C
    Stack

    D
    Queue

    Note: Not available
    1. Report
  7. Question: You are creating a custom dictionary class. You want it to be type-safe, using a string for a key and your custom class Product as the value. Which class declaration meets your requirements? - VB.NET

    A
    Public Class Products2
    Inherits StringDictionary
    End Class

    B
    Class Products
    Inherits Dictionary(Of String, Product)
    End Class

    C
    Class Products
    Inherits StringDictionary(Of String, Product)
    End Class

    D
    Class Products
    Inherits Dictionary
    End Class

    Note: Not available
    1. Report
  8. Question: You create an instance of the SortedList collection, as shown here:

    Dim sl As New SortedList(Of Product, string)()

    Which declaration of the Product class works correctly? - VB.NET

    A
    Public Class Product
    Implements IComparable
    Public productName As String
    Public Sub New(ByVal _productName As String)
    Me.productName = _productName
    End Sub
    Public Function CompareTo(ByVal obj As Object) As Integer _
    Implements System.IComparable.CompareTo
    Dim otherProduct As Product = DirectCast(obj, Product)
    Return Me.productName.CompareTo(otherProduct.productName)
    End Function

    B
    Public Class Product
    Public productName As String
    Public Sub New(ByVal _productName As String)
    Me.productName = _productName
    End Sub
    Public Function CompareTo(ByVal obj As Object) As Integer _
    Implements System.IComparable.CompareTo
    Dim otherProduct As Product = DirectCast(obj, Product)
    Return Me.productName.CompareTo(otherProduct.productName)
    End Function
    End Class

    C
    Public Class Product
    Implements IEquatable
    Public productName As String
    Public Sub New(ByVal _productName As String)
    Me.productName = _productName
    End Sub
    Public Function Equals(ByVal obj As Object) As Integer _
    Implements System.IEquatable.Equals
    Dim otherProduct As Product = DirectCast(obj, Product)
    Return Me.productName.Equals(otherProduct.productName)
    End Function
    End Class

    D
    Public Class Product
    Public productName As String
    Public Sub New(ByVal _productName As String)
    Me.productName = _productName
    End Sub
    Public Function Equals(ByVal obj As Object) As Integer
    Dim otherProduct As Product = DirectCast(obj, Product)
    Return Me.productName.Equals(otherProduct.productName)
    End Function
    End Class

    Note: Not available
    1. Report
  9. Question: Which of the following are required to serialize an object? (Choose all that apply.) - VB.NET

    A
    An instance of BinaryFormatter or SoapFormatter

    B
    File permissions to create temporary files

    C
    Microsoft Internet Information Services (IIS)

    D
    A stream object

    Note: Not available
    1. Report
  10. Question: Which of the following attributes should you add to a class to enable it to be serialized? - VB.NET

    A
    ISerializable

    B
    Serializable

    C
    SoapInclude

    D
    OnDeserialization

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