Which code segment should you use?
You need to create a method to clear a Queue named q. Which code segment should you use?
What should you do?
You create Microsoft Windows-based applications. You are creating a method. Your applications will call the method multiple times. You write the following lines of code for the method.
public string BuildSQL(string strFields, string strTable, string strFilterId) {
string sqlInstruction = “SELECT “;
sqlInstruction += strFields;
sqlInstruction += ” FROM “;
sqlInstruction += strTable;
sqlInstruction += ” WHERE id =”;
sqlInstruction += strFilterid;
return sqlInstruction;
}
The method generates performance issues. You need to minimize the performance issues that the multiple string concatenations generate.
What should you do?
Which transaction mechanism should you choose?
You are an enterprise application developer. You are creating a three-tier application. The business layer contains 10 business functions. These business functions write messages to message queues and update records in a Microsoft SQL Server database. You need to identify the transaction mechanism for these business functions to group both the activities together as one atomic transaction unit. Which transaction mechanism should you choose?
Which code segment should you use?
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?
What should you do?
You create Microsoft Windows-based applications. You are creating a stock trading application. The application keeps track of stock prices and raises events when the stock prices increase or decrease. The events are raised based on specific thresholds. When the events are raised, users specify whether to buy, sell, or hold the stocks. The stock trading application currently uses the Trace class to log the events raised by the application and the user responses. The raised events and the user responses are then logged to a Windows application log. You change the application logging mechanism to meet the following requirements:
Log entries are saved in a central database.
Log entries are also saved to the local application log.
Other applications are able to use the same logging mechanism.
The application code is changed as little as possible.
You create a central database to store log entries for multiple databases. You need to choose a system-wide logging mechanism that is reused by the application and is a part of the application design structure.
What should you do?
Which three stored procedures should you recommend?
You are an enterprise application developer. You are designing a Web-based application to maintain appointment details.
You consider implementing the following steps to delete an appointment:
Enter a date range or a client ID, or enter a date range and a client ID to get a list of appointments.
Click the Appointment hyperlink. The appointment details are retrieved and displayed.
Click the Delete button.
You need to analyze the requirements and recommend stored procedures. Which three stored procedures should you recommend? (Each correct answer presents part of the solution. Choose three.)
Which code segment should you use?
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?
Which two tests should you choose?
You create Microsoft Windows-based applications. The sales department uses an application that accesses data from a local Microsoft Office Access database. To enable sales representatives to access the application when they are not in the office, you plan to install the application on a terminal server. The application will be accessed by 200 users simultaneously through a terminal services connection. You need to design an appropriate test strategy for the change.
Which two tests should you choose? (Each correct answer presents part of the solution. Choose two.)
Which layer should you create for each database product?
You are an enterprise application developer. You are creating an application. The application uses different database products for different customers. You need to ensure maximum reuse of the code that is available in the different layers of the application. You also need to ensure that the application uses the unique features of each database product. Which layer should you create for each database product?
Which criterion should the method meet?
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?