|
Microsoft 70-549(C++) Exam - ActualPaper.com Free 70-549(C++) Sample Questions:
Q: 1 You are an enterprise application developer. You design a data access
component that interacts with a Microsoft SQL Server database. The component uses a database
connection string. The database connection string is stored in clear text in the ConnectionStrings section
of the application configuration file. During testing, you discover that the component might be vulnerable
to SQL injection attacks. You need to adopt a strategy to protect the component from SQL injection
attacks. What should you do?
A. Replace all dynamic SQL statements with parameterized SQL statements that use strongly typed SQL
parameters.
B. Construct all dynamic SQL statements by using a SecureString object.
C. Modify the method so that it throws an exception if the SQL statement does not return any rows.
D. Encrypt the ConnectionStrings section of the configuration file.
Answer: A
Q: 2 You are an enterprise application developer. You are implementing a new
component for an application. The component accesses a database to populate a list of customer objects
and exposes a method that is named GetAllCustomers. The component uses a design pattern to access the
database only on an as-needed basis. A caching mechanism exists in a lower tier of the application
architecture. The component must not cache data. You need to implement the logic for populating a list
of customer objects by using a database query. You also need to ensure that you meet the company
guidelines for the component design pattern. What should you do?
A. Execute a query in the constructor of the component to populate a field of type List<Customer>. Return the
List reference in the call to the GetAllCustomers method.
B. Execute a query in the static constructor of the component to populate a static field of type
List<Customer>. Return the List reference in the call to the GetAllCustomers method.
C. Execute a query in the GetAllCustomers method to populate a local variable of type List<Customer>.
Return the List reference.
D. Execute a query in the GetAllCustomers method to populate a field of type List<Customer> only if the
field is null. Return the List reference.
Answer: C
Q: 3 You are an enterprise application developer. You are creating the first
version of an application to manage rich text documents.
The application must meet the following design requirements:
Support the file system and a Microsoft SQL Server database as data stores.
Ensure the following for future versions:
o Add support for additional data stores, including network storage.
o Acquire the ability to interface with third-party-distributed authoring and versioning tools.
Bring additional storage options online without having to redeploy the entire application.
You need to identify an appropriate approach to meet these requirements. Which approach should you
choose?
A. Create a single Document component to represent the rich text content of a document and include methods
on the component to persist and retrieve rich text for each type of data store.
B. Create a single Document component to represent the rich text content of a document and an enumeration
to represent each available data store. Include a parameter of the enumerated type in methods interfacing with a
data store.
C. Create a single Document component to represent the rich text content of a document and an enumeration
to represent each available data store. Include a property on the Document component to permit the selection of
a data store.
D. Create a Document component to represent the rich text content of a document. Create a
DocumentRepository component to manage the various data stores.
Answer: D
Q: 4 You are an enterprise application developer. You are creating an application
that has a layered architecture as shown in the following diagram. A component that resides in the
workflow layer manages transactions across one or more activities in the business logic layer. You need
to make modifications to the component. You need to identify the layers that might require modification
when the component in the workflow layer is modified.

Which two layers should you identify? (Each
correct answer presents part of the solution. Choose two.)
A. Presentation layer
B. Service fa?ade layer
C. Business logic layer
D. Data access layer
Answer: A, B
Q: 5 You are an enterprise application developer. You are creating a .NET
Remoting component. The Version 1.0 of the component is deployed as a well-known server-activated
object. The strong-named component is installed into the global assembly cache. Ten distributed
applications in your company utilize the component, and each application has an independent schedule
for upgrades and deployment. You add new features to the component. These additions will change the
signatures of the public methods on the component. You need to devise a deployment strategy for the
component. What should you do?
A. Deploy the component in place of the existing well-known object.
B. Deploy the component as a well-known object.
C. Increment the version number of the component assembly. Deploy the component in place of the existing
well-known object.
D. Increment the version number of the component assembly. Deploy the component as a new well-known
object.
Answer: D
Q: 6 You are an enterprise application developer. You are creating a component
that processes loan requests. Your component will be used inside Microsoft Windows Forms client
applications. The loan request form is complex and time consuming to complete. Loan data is saved to a
Microsoft SQL Server 2005 database. You need to ensure that in case of a system failure the loan officer
does not need to re-enter any loan data. What should you do?
A. Implement a private Save method that saves all property values to the database. Call the Save method from
inside your components finalizer.
B. Implement code inside the Set accessor for each property that saves the property value to the database.
C. Implement a public Save method that saves all property values to a static variable.
D. Implement code inside the Set accessor that saves the property value to a static variable.
Answer: B
Q: 7 You are an enterprise application developer. You create a component that
generates medical documents. Your component is used by multiple document management systems.
Users generate documents throughout the entire day and most documents are generated during business
hours. You notice that user load is increasing and performance is degrading. You need to identify
sections of code on which to focus performance tuning efforts. Which two actions should you
recommend? (Each correct answer presents part of the solution. Choose two.)
A. Analyze the resource usage for the objects created in the component.
B. Analyze the execution time for methods in the component.
C. Analyze the time periods of peak frequency of document creation.
D. Analyze which application users are generating the greatest number of documents.
E. Analyze which client applications are generating the greatest number of documents.
Answer: A, B
Q: 8 You are an enterprise application developer. You are creating a component
that will be used in an order fulfillment process.
The component performs the following two tasks:
Modifies data in a local Microsoft SQL Server database
Adds data to a remote SQL Server database
The application that uses the component is multithreaded. Each application thread that uses the
component creates its own instances of the component classes. You need to ensure that the component
either performs both tasks successfully or performs neither task. What should you do?
A. Use the System.Threading.Monitor class to synchronize the code segment that performs the data
modifications and submits the message.
B. Use classes in the System.Transactions namespace to enlist both tasks in a distributed transaction.
C. Enable Multiple Active Result Sets (MARS) for each database connection.
D. Use ADO.NET DataAdapter objects that are configured to support batch updates.
Answer: B
Q: 9 You are an enterprise application developer. You are creating a component
that will be deployed as part of a class library. The component must meet the following specifications:
The interface of the component must be accessible to components outside the hosting assembly.
The interface of the component must be interoperable with components written in any other .NET
Framework languages.
The implementation of the component cannot be expanded upon by a derived class.
You need to design the interface of the component.
Which three tasks should you perform? (Each correct answer presents part of the solution. Choose
three.)
A. Apply the CLSCompliant(true) attribute to the assembly and component definition.
B. Apply the abstract keyword to the component definition.
C. Apply the ComVisible(true) attribute to the assembly and component definition.
D. Create a primary interop assembly for the assembly that hosts your component.
E. Apply the sealed keyword to the component definition.
F. Apply the public keyword to the component definition.
Answer: A, E, F
Q: 10 You are an enterprise application developer. You are creating an
application that will deploy an on-demand training program. The training is a combination of documents
and video files that the user can access from an internal server on the LAN. Users might access this
application through their home computers when they are connected to the corporate network through a
virtual private network (VPN). You need to design the video portion for the on-demand training
program. You also need to ensure that users can view the videos without making modifications to their
computer configuration. Which two actions should you perform? (Each correct answer presents part of
the solution. Choose two.)
A. Create one file for all demonstrations.
B. Create a set of files that have different qualities for different connection speeds.
C. Create a set of files that have different formats for different players.
D. Create a set of files for the corporate office and one set for the branch offices.
E. Create a set of files for the VPN users.
F. Create a set of files that require license keys to protect the content.
Answer: B, C
Q: 11 You are an enterprise application developer. You create a component that
executes queries against Microsoft SQL Server. The queries are executed inside the scope of a
transaction. The transaction is started by using the SqlTransaction object. The code executes the query
inside a Try block. You need to create an exception handling mechanism that rolls back the transaction
under any error condition and notifies the caller of the error. What should you do?
A. Use a catch block to catch all exceptions. Roll back the transaction and rethrow the exception inside the
catch block.
B. Place code to roll back the transaction inside a finally block.
C. Place the SqlTransaction object inside a using statement.
D. Use a catch block to catch all exceptions. Rethrow the exception inside the catch block and roll back the
transaction in the finally block.
Answer: A
Q: 12 You are an enterprise application developer for Woodgrove Bank. You are
creating an application to manage different loan types. All loan types share a common implementation
for interacting with the financial systems of Woodgrove. Each loan type must implement its own rules for
calculating interest. In the first version of the application, you must support car loans and house loans.
You need to develop an architecture for the different loan types within your application. What should
you do?
A. Implement Loan as an abstract class. Implement CarLoan and HouseLoan as concrete classes.
B. Implement Loan as an interface. Implement CarLoan and HouseLoan as concrete classes.
C. Implement Loan as a concrete class. Implement CarLoan and HouseLoan as interfaces.
D. Implement Loan as a sealed class. Implement CarLoan and HouseLoan as abstract classes.
Answer: A
Q: 13 You are an enterprise application developer. You are creating an
application to manage the inventories of 1,000 stores in geographically dispersed locations. The stores are
connected to the main office through a secure network infrastructure. Inventory data from the store
servers must be consolidated at the main office everyday. The main office initiates the consolidation by
calling a component at the store. Transactional integrity must be maintained during consolidation.
Security policy requires the application to propagate Microsoft Windows security context throughout the
system to ensure authorization and authentication. Security policy does not permit Web servers at the
stores. You need to recommend a reusable component technology that permits data from the store
servers to be consolidated at the main office. You also need to ensure that the security policy
requirements are met. What should you recommend?
A. Web services
B. Serviced components
C. .NET Remoting over HTTP
D. .NET Windows service
Answer: B
Q: 14 You are an enterprise application developer. You are designing an
application that manages names and descriptions for your companys products.
To manipulate these items, the application requires the object that holds the strings to meet the following
criteria:
Be dynamically resizable.
Be able to store duplicate entries.
Expose methods to find all instances of the same text.
You need to recommend an appropriate container for the strings. What should you recommend?
A. an ArrayList class
B. a StringCollection class
C. a Hashtable class
D. a DataTable class
Answer: D
Q: 15 You are an enterprise application developer. You design and develop an
event logging strategy for a distributed system. The distributed system consists of a Web-based
application, a Microsoft Windows service, and several Microsoft Windows-based applications. The event
logging strategy must meet the following requirements:
All system errors are logged and available to a central administration application.
The data is available for historical analysis.
The delivery mechanism is fault-tolerant and reliable.
You need to recommend a system-wide event logging strategy. What should you recommend?
A. Write events to the event log on each client computer. Use File Transfer Protocol (FTP) to send the events
to the central server at the end of the day.
B. Write events to a DataSet object. Serialize the results to the central server on a configurable timer.
C. Write events to a Message Queue and import them into a database.
D. Write a Web service that logs events to the centralized data store.
Answer: C
Q: 16 You are an enterprise application developer. You create a large-scale,
managed application that needs a consistent approach to event logging. The application must format and
log events to 20 destinations. Events from 15 sources must be collated onto a single computer. The
application must perform the following tasks:
Maintain consistent logging and instrumentation practices, both within an application and across the
enterprise.
Ease the learning curve for developers by using a consistent architectural model.
Support custom implementations of formatters and event sinks.
Generate log entries as discrete events or as part of a traced process.
You need to select an appropriate implementation approach. Which approach should you choose?
A. Use the Logging and Instrumentation Application Block from Enterprise Library.
B. Write a custom event management component based upon the Publisher-Subscriber pattern.
C. Use the EventLog component from Microsoft .NET Framework.
D. Use the Message Queuing components from Enterprise Services.
Answer: A
Q: 17 You are an enterprise application developer. You create a distributed
invoicing solution. Operating requirements state that the memory that is used by the Microsoft
Windows-based applications must not exceed a specified value. Technology requirements state that all
execution failures must be reported.
The Windows-based application must meet the following criteria:
Alert system administrators when the memory usage reaches a critical value.
Alert system administrators when a technical exception occurs.
Log processor and disk space usage on all client computers.
You need to select an event management implementation to meet the criteria. What should you choose?
A. Tracing
B. System Event Log
C. Performance Counters
D. Microsoft Windows Management Instrumentation (WMI)
Answer: D
Q: 18 You are an enterprise application developer. You are developing several
Web services that are accessed by smart client applications. The Web services might be installed on
different Web servers. The smart client applications must authenticate users by using credentials issued
by a single sign-on service. The single sign-on service was developed by a different group in your
organization.
The security policy of the application includes the following requirements:
User identity must be transmitted across application boundaries.
User identity must be logged for auditing purposes.
You need to choose a strategy to propagate user information securely across the application boundaries.
What should you choose?
A. Use remote method calls to pass user information between applications that use function parameters.
B. Install business components in Enterprise Services and use Kerberos tickets to authenticate users.
C. Use SOAP headers to pass user identity across application assemblies and log authentication information at
each boundary.
D. Use NTLM tokens to authenticate users and trusted Microsoft Windows domains.
Answer: C
Q: 19 You are an enterprise application developer. A Web-based application
manages the employee information in your company. A rapid increase in the number of employees
renders scalability difficult. You must suggest a component strategy that permits the application to scale
as the number of employees grows.
The component must implement the following application features:
It resides completely behind a company firewall.
It has complex transactional and auditing requirements.
It operates across multiple servers within the company.
It provides runtime identity services for each employee.
You need to choose a component type that implements these features in a scalable manner. You need to
achieve this goal by using the least coding effort. Which component type should you choose?
A. .NET Framework remoting component
B. Web services component
C. .NET Framework class library component
D. Enterprise Services component
Answer: D
Q: 20 You are an enterprise application developer. You create 10 applications.
Your companys application server will host the applications. You are responsible for designing a
monitoring solution for the applications.
Your monitoring solution must meet the following criteria:
The solution must be reusable.
The solution must aggregate all data into one display.
You need to design a solution to meet the requirements. What should you do?
A. Add performance counters and Microsoft Windows Management Instrumentation (WMI) events to each
application. View the counter data in the Performance Monitor and develop a custom application to view the
WMI data.
B. Write data access code in each application to update a database table. Write an ASP.NET application to
display the aggregated data.
C. Develop a custom monitoring object. Use the object in each application. Aggregate the information from
the custom object into a report and publish it to a Web server every hour.
D. Write a Web service to store the monitored information. Write one Web method per application to retrieve
the monitored data. Call the Web service from each application.
Answer: C |