Q61. - (Topic 2) 

You are developing an application that includes the following code segment: 

You need to implement the Open() method of each interface in a derived class named UseResources and call the Open() method of each interface. 

Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.) 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: A,C 

Explanation: 

* An interface contains only the signatures of methods, properties, events or indexers. A class or struct that implements the interface must implement the members of the interface that are specified in the interface definition. 

* Example: interface ISampleInterface { void SampleMethod(); } 

class ImplementationClass : ISampleInterface 

// Explicit interface member implementation: 

void ISampleInterface.SampleMethod() 

// Method implementation. 

static void Main() 

// Declare an interface instance. 

ISampleInterface obj = new ImplementationClass(); 

// Call the member. 

obj.SampleMethod(); 


Q62. HOTSPOT - (Topic 1) 

You have the following code: To answer, complete each statement according to the information presented in the code. 

Answer: 


Q63. HOTSPOT - (Topic 2) 

You have the following code (line numbers are included for reference only): 

To answer, complete each statement according to the information presented in the code. 

Answer: 


Q64. - (Topic 1) 

You are developing an application that will transmit large amounts of data between a client computer and a server. You need to ensure the validity of the data by using a cryptographic hashing algorithm. Which algorithm should you use? 

A. RSA 

B. Aes 

C. HMACSHA256 

D. DES 

Answer:


Q65. - (Topic 2) 

You need to write a method that retrieves data from a Microsoft Access 2013 database. 

The method must meet the following requirements: 

Be read-only. 

Be able to use the data before the entire data set is retrieved. 

Minimize the amount of system overhead and the amount of memory usage. 

Which type of object should you use in the method? 

A. SqlDataAdapter 

B. DataContext 

C. DbDataAdapter 

D. OleDbDataReader 

Answer:

Explanation: OleDbDataReader Class 

Provides a way of reading a forward-only stream of data rows from a data source. 

Example: 

OleDbConnection cn = new OleDbConnection(); 

OleDbCommand cmd = new OleDbCommand(); 

DataTable schemaTable; 

OleDbDataReader myReader; 

//Open a connection to the SQL Server Northwind database. 

cn.ConnectionString = "Provider=SQLOLEDB;Data Source=server;User ID=login; 

Password=password;Initial Catalog=Northwind"; 


Q66. DRAG DROP - (Topic 1) 

You are developing a class named Temperature. 

You need to ensure that collections of Temperature objects are sortable. 

How should you complete the relevant code segment? (To answer, drag the appropriate code segments to the correct locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.) 

Answer: 


Q67. - (Topic 1) 

You are implementing a method named FloorTemperature that performs conversions between value types and reference types. The following code segment implements the method. (Line numbers are included for reference only.) 

You need to ensure that the application does not throw exceptions on invalid conversions. Which code segment should you insert at line 04? 

A. int result = (int)degreesRef; 

B. int result = (int)(double)degreesRef; 

C. int result = degreesRef; 

D. int result = (int)(float)degreesRef; 

Answer:


Q68. DRAG DROP - (Topic 2) 

You are creating a method that will split a single input file into two smaller output files. 

The method must perform the following actions: 

. Create a file named header.dat that contains the first 20 bytes of the input file. 

. Create a file named body.dat that contains the remainder of the input file. 

You need to create the method. 

How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.) 

Answer: 


Q69. - (Topic 1) 

You are developing an application. The application converts a Location object to a string by using a method named WriteObject. The WriteObject() method accepts two parameters, a Location object and an XmlObjectSerializer object. 

The application includes the following code. (Line numbers are included for reference only.) 

You need to serialize the Location object as a JSON object. 

Which code segment should you insert at line 20? 

A. New DataContractSerializer(typeof(Location)) 

B. New XmlSerializer(typeof(Location)) 

C. New NetDataContractSenalizer() 

D. New DataContractJsonSerializer(typeof(Location)) 

Answer:

Explanation: 

The DataContractJsonSerializer class serializes objects to the JavaScript Object Notation 

(JSON) and deserializes JSON data to objects. 

Use the DataContractJsonSerializer class to serialize instances of a type into a JSON 

document and to deserialize a JSON document into an instance of a type. 


Q70. - (Topic 2) 

You are developing an application that includes a class named Customer and a generic list of customers. The following code segment declares the list of customers: 

List<Customer> customersList = new List<Customer> () ; 

You populate the customersList object with several hundred Customer objects. 

The application must display the data for five Customer objects at a time. 

You need to create a method that will return the correct number of Customer objects. 

Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: