Check Your C# Experince Here

Discussion in 'C#' started by damoonica, Oct 17, 2008.

  1. damoonica

    damoonica New Member

    Joined:
    Oct 17, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    a place to add usefull problem like question specially for those who are going to be ready for MCTS 70-536
     
  2. damoonica

    damoonica New Member

    Joined:
    Oct 17, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    QUESTION 1
    You work as the application developer at Certkiller .com. Certkiller .com uses Visual
    Studio.NET 2005 as its application development platform.
    You are in the process of storing numerical values up to 2,100,000,000 into a
    variable and may require storing negative values using a .NET Framework 2.0
    application. You are required to optimize memory usage
    What should you do?
    A. Int32
    B. UInt16
    C. UInt32
    D. Int16
     
  3. damoonica

    damoonica New Member

    Joined:
    Oct 17, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    the answer will be available after 3 comments
     
  4. Bitmatic

    Bitmatic New Member

    Joined:
    Nov 2, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Home Page:
    http://www.bitmatic.com
  5. damoonica

    damoonica New Member

    Joined:
    Oct 17, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    You got it , the correct answer is A
    so then check out the another question:

    You work as an application developer at www.megaposts.net . You are currently in the

    process of creating a class that stores data about Certkiller .com’s customers.

    Certkiller .com customers are assigned unique identifiers and various characteristics

    that may include aliases, shipping instructions, and sales comments. These

    characteristics can change in both size and data type.

    You start by defining the Customer class as shown below:

    public class Customer

    {

    private int custID;

    private ArrayList attributes;

    public int CustomerID

    {

    get {return custID;}

    }
    public Customer (int CustomerID)

    {

    this.custID = CustomerID;

    this.attributes = new ArrayList ();

    }

    public void AddAttribute (object att)

    {

    attributes.Add (att);

    }

    }​

    You have to create the FindAttribute method for locating attributes in Customer

    objects no matter what the data type is.

    You need to ensure that the FindAttribute method returns the attribute if found,

    and you also need to ensure type-safety when returning the attribute.

    What should you do?

    A. Use the following code to declare the FindAttribute method:

    public T FindAttribute (T att)

    {

    //Find attribute and return the value

    }​
    B. Use the following code to declare the FindAttribute method:

    public object FindAttribute (object att)

    {

    //Find attribute and return the value

    }​
    C. Use the following code to declare the FindAttribute method:

    public T FindAttribute <T> (T att)

    {

    //Find attribute and return the value

    }​
    D. Use the following code to declare the FindAttribute method:

    public string FindAttribute (string att)

    {

    //Find attribute and return the value

    }​
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice