Study Guides and Actual Real Exam Questions For Oracle OCP, MCSE, MCSA, CCNA, CompTIA


Advertise

Submit Braindumps

Forum

Tell A Friend

    Contact Us

 Home

 Search

Latest Brain Dumps

 BrainDump List

 Certifications Dumps

 Microsoft

 CompTIA

 Oracle

  Cisco
  CIW
  Novell
  Linux
  Sun
  Certs Notes
  How-Tos & Practices 
  Free Online Demos
  Free Online Quizzes
  Free Study Guides
  Free Online Sims
  Material Submission
  Test Vouchers
  Users Submissions
  Site Links
  Submit Site

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Online Training Demos and Learning Tutorials for Windows XP, 2000, 2003.

 

 

 

 





Braindumps for "250-501" Exam

Need Dump, Please help

 Anybody can give me the latest dump?Thanks 



Google
 
Web www.certsbraindumps.com


Braindumps: Dumps for 70-552 Exam Brain Dump

Study Guides and Actual Real Exam Questions For Oracle OCP, MCSE, MCSA, CCNA, CompTIA


Advertise

Submit Braindumps

Forum

Tell A Friend

    Contact Us





Braindumps for "70-552" Exam

UPGRADE: MCAD Skills to MCPD Windows Developer by Using the Microsoft .NET Framework

 Question 1.
You are developing a method to encrypt sensitive data with the Data Encryption Standard (DES) algorithm. Your method accepts the following parameters:

The byte array to be encrypted, which is named message An encryption key, which is named key An initialization vector, which is named iv

You need to encrypt the data. You also need to write the encrypted data to a Memory Stream object.

Which code segment should you use?

A. DES^ des = gcnew DESCryptoServiceProvider();
    des->BlockSize = message->Length;
    ICryptoTransform^ crypto = des->CrcateEncryptor(key, iv);
    MemoryStrearm ^cipherStream = gcnew MemoryStream();
    CryptoStream ^cryptoStream = gcnew CryptoStream(cipherStream,crypto,
    CryptoStreamMode::Write);
    cryptoStream->Write(message, 0, message->Length);
B. DES ^des = gcnew DESCryptoServiceProvider();
    ICryptoTransform ^crypto = des->CreateDecryptor(key, iv);
    MemoryStream ^cipherStream = gcnew MemoryStream();
    CryptoStream ^cryptoStream = gcnew CryptoStream(cipherStream, crypto,
    CryptoStreamMode::Write);
    cryptoStream->Write(message, 0, message->Length);
C. DES ^des = gcnew DESCryptoServiceProvider();
    ICryptoTransform ^crypto = des->CreateEncryptor();
    MemoryStream ^cipherStream = gcnew MemoryStream();
    CryptoStream ^cryptoStream = gcnew CryptoStream(cipherStream,crypto,
    CryptoStreamMode::Write);
    cryptoStream->Write(message, 0, message->Length);
D. DES ^des = gcnew DESCryptoServiceProvider();
    ICryptoTransform ^crypto = des->CreateEncryptor(key, iv);
    MemoryStream ^cipherStream = gcnew MemoryStream();
    CryptoStream ^cryptoStream = gcnew CryptoStream(cipherStream, crypto,
    CryptoStreamMode::Write);
    cryptoStream->Write(message, 0, message->Length);

Answer: D

Explanation:
Use the DesCryptoServiceProvider to create a new encryptor.Create a CryptoStream that encrypt directly to the MemoryStream and call the Write() method to perform the encryption.
A Uses a blocksize set to size of the entire message
B creates a decryptor instead of an encryptor.
C does not initialise the encryptor with the key and iv correctly.

Question 2.
You are developing a class library that will open the network socket connections to computers on the network. You will deploy the class library to the global assembly cache and grant it full trust.
You write the following code to ensure usage of the socket connections.
Socket Permission^ permission =
gcnew Socket Permission (Permission State :: Unrestricted);
permission->Assert ();
Some of the applications that use the class library might not have the necessary permissions to open the network socket connections.
You need to cancel the assertion.

Which code segment should you use?

A. Code Access Permission::RevertAssert();
B. Code Access Permission::RevertDeny();
C. permission->Deny();
D. permission->PermitOnly();

Answer: A

Explanation:
CodeAccessPermission.ReverAssert() should be used to undo a previous Assert call.
B is used to revert a previous deny call.
C & D are used to reduce the CAS permissions, they do not undo a previous Assert call.

Question 3.
You are creating an undo buffer that stores data modifications. You need to ensure that the undo functionality undoes the most recent data modifications first. You also need to ensure that the undo buffer permits the storage of strings only. 

Which code segment should you use?

A. Stack undoBuffer = gcnew Stack();
B. Stack undoBuffer = gcnew Stack();
C. Queue undoBuffer = gcnew Queue();
D. Queue undoBuffer = gcnew Queue();

Answer: A

Explanation:
A Stack caters for a last in first out scenario similar to what is required in an undo buffer. By using Generics you can force a strongly typed collection that takes strings only.
B is not strongly typed for strings, it will take any type of object.
C & D Queue is a First in First out collection, it is not appropriate in this instance.

Question 4.
You need to create a method to clear a Queue named q. 

Which code segment should you use?

A. for each (Object^ e in q) {
    q.Dequeue();
    }
B. for each (Object^ e in q) {
    q.Enqueue(0);
    }
C. q.Clear();
D. q.Dequeue();

Answer: C

Explanation:
Simply call the Clear() method to empty a queue.
A Dequeuing all of the items in a queue will also serve the same affect but it is a lot more roundabout.
B attempts to re-queue items that are already in the queue
D will de-queue only one item that is at the front of the queue.

Question 5.
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?

A. public ref class PrintingArgs {
    public :
    int Copies;
    PrintingArgs (int numberOfCopies) {
    this->Copies = numberOfCopies;
    }};
B. public ref class PrintingArgs : public EventArgs {
    public :
    int Copies;
    PrintingArgs(int numberOfCopies) {
    this->Copies = numberOfCopies;
    }};
C. public ref class PrintingArgs {
    public :
    EventArgs Args;
    PrintingArgs(EventArgs ea) {
    this->Args = ea;
     }};
D. public ref class PrintingArgs : public EventArgs {
    public :
    int Copies;
    };

Answer: B

Explanation:
The event handler will require a parameter of type EventArgs or a derived type. The derived type in this example will question states that the event handler helps specify the number of documents that require printing, this information will have to come from the derived EventArgs class in the form of an instance variable.

A & C do not derive from EventArgs hence cannot fit into the event handling model. 
D does not expose the copies instance variable.

Question 6.
You write the following custom exception class named CustomException.
public class CustomException : ApplicationException {
public static int COR_E_ARGUMENT =
unchecked((int)0x80070057);
public CustomException(string msg) : base(msg) {
HResult = COR_E_ARGUMENT;
}}

You need to write a code segment that will use the CustomException class to immediately return control to the COM caller. You also need to ensure that the caller has access to the error code.

Which code segment should you use?

A. return Marshal.GetExceptionForHR(
    CustomException.COR_E_ARGUMENT);
B. return CustomException.COR_E ARGUMENT;
C. Marshal.ThrowExceptionForHR(
    CustomException.COR_E_ARGUMENT);
D. throw new CustomException(“Argument is out of bounds”);

Answer: D

Question 7.
You create a class library that is used by applications in three departments of Company.com. The library contains a Department class with the following definition.
public class Department {
public string name;
public string manager;
}
Each application uses a custom configuration section to store department-specific values in the
application configuration file as shown in the following code.

Hardware
Company


You need to write a code segment that creates a Department object instance by using the field values retrieved from the application configuration file. 

Which code segment should you use?

A. public class deptElement : ConfigurationElement {
    protected override void DeserializeElement(
    XmlReader reader, bool serializeCollectionKey) {
    Department dept = new Department();
    dept.name = ConfigurationManager.AppSettings[“name”];
    dept.manager =
    ConfigurationManager.AppSettings[“manager”];
    return dept;
    }}
B. public class deptElement: ConfigurationElement {
    protected override void DeserializeElement(
    XmlReader reader, bool serializeCollectionKey) {
    Department dept = new Department();
    dept.name = reader.GetAttribute(“name”);
    dept.manager = reader.GetAttribute(“manager”);
    }
    }
C. public class deptHandler : IConfigurationSectionHandler {
    public object Create(object parent, object configContext,
    System.Xml.XmlNode section) {
    Department dept = new Department();
    dept.name = section.SelectSingleNode(“name”).InnerText;
    dept.manager =
    section.SelectSingleNode(“manager”).InnerText;
    return dept;
    }
    }
D. public class deptHandler : IConfigurationSectionHandler {
    public object Create(object parent, object configContext,
    System.Xml.XmlNode section) {
    Department dept = new Department();
    dept.name = section.Attributes[“name”].Value;
    dept.manager = section.Attributes [“manager”] .Value;
    return dept;
    }
    }

Answer: C

Question 8.
You write the following custom exception class named CustomException.
public ref class CustomException : ApplicationException {public:
literal int COR_E_ARGUMENT = (int)0x80070057;
CustomException(String^ msg) : ApplicationException(msg)
{
HResult = COR_E_ARGUMENT;
}};

You need to write a code segment that will use the CustomException class to immediately return control to the COM caller. You also need to ensure that the caller has access to the error code.

Which code segment should you use?

A. return Marshal::GetExceptionForHR(
    Custom Exception::COR_E_ARGUMENT);
B. return CustomException::COR_E_ARGUMENT;
C. Marshal::ThrowExceptionForHR(
    CustomException::COR_E_ARGUMENT);
D. throw gcnew CustomException(“Argument is out of bounds”);

Answer: D

Question 9.
You are writing a method to compress an array of bytes. The array is passed to the method in a parameter named document. You need to compress the incoming array of bytes and return the result as an array of bytes. 

Which code segment should you use?

A. MemoryStream^ strm = gcnew MemoryStream(document);
    DeflateStream^ deflate = gcnew DeflateStream(strm,
    CompressionMode::Compress);
    array^ result = gcnew array(document->Length);
    deflate->Write(result, 0, result->Length);
    return result;
B. MemoryStream^ strm = gcnew MemoryStream(document);
    DeflateStream^ deflate = gcnew DeflateStream(strm,
    CompressionMode::Compress);
    deflate->Write(document, 0, document->Length);
    deflate->Close();
    return strm->ToArray();
C. MemoryStream^ strm = gcnew MemoryStream();
    DeflateStream^ deflate = gcnew DeflateStream(strm,CompressionMode::Compress);
    deflate->Write(document, 0, docunient->Length);
    deflate->Close();
    return strm->ToArray();
D. Memory Stream^ inStream = gcnew MemoryStream(document);
    DeflateStream^ deflate = gcnew DeflateStream(inStream,
    CompressionMode::Compress);
    MemoryStream^ outStream = gcnew MemoryStream()
    int b;
    while ((b = deflate->ReadByte()) != -1) {
    outStream->WriteByte((Byte)b);
    }
    return outStream->ToArray();

Answer: C

Explanation:
The document is compressed and written to a new MemoryStream using the Deflate class.
Finally the compressed data can be returned as an array of bytes using the ToArray method of the MemoryStream.

A does not compress and write the document, instead it is compressing and writing an empty array
B & D are reading and writing to the same document.

Question 10.
You are writing a custom dictionary. The custom-dictionary class is named MyDictionary. You need to ensure that the dictionary is type safe.

Which code segment should you use?

A. public ref class MyDictionary : public Dictionary{};
B. public ref class MyDictionary : public Hashtable{};
C. public ref class MyDictionary : public IDictionary{};
D. public ref class MyDictionary{};
    Dictionary t = gcnew Dictionary();
    MyDictionary dictionary = (MyDictionary)t;

Answer: A


Google
 
Web www.certsbraindumps.com


Study Guides and Real Exam Questions For Oracle OCP, MCSE, MCSA, CCNA, CompTIA





              Privacy Policy                   Disclaimer                    Feedback                    Term & Conditions

www.helpline4IT.com

ITCertKeys.com

Copyright © 2004 CertsBraindumps.com Inc. All rights reserved.