Microsoft PRO: Design & Develop Wndws Apps Using MS .NET Framework 4 Sample Questions:
1. You are designing a sales and inventory tracking system by using Microsoft Visual Studio 2010 and Microsoft SQL Server 2008.
The sales, inventory, and shipping tables will reside in different databases on different
database servers.
You need to ensure that the tables are updated simultaneously.
What should you do?
A) Use LINQ to SQL.
B) Use Distributed transactions.
C) Use Microsoft Sync Framework.
D) Use the ADO.NET Entity Framework.
2. You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft .NET Framework 4.
The application retrieves customer data from an enterprise resource planning (ERP) system.
You need to ensure that the following requirements are met: - Customer data is retrieved only once.
- Customer data is available on multiple forms within the application.
- Forms can implement Two-Way binding to the customer datA.
What should you do?
A) Design a static class for the data that implements the INotifyPropertyChanged interface. Raise the PropertyChanged event to notify the forms when data is changed.
B) Store the results of the query in a static DataTable object that is used by all the forms.
C) Design a static class for the data that implements the IObservable interface. Subscribe to the static class from each of the forms that use the datA.
D) Store the results of the query in a local XML file. Bind all forms to an XMLDataAdapter object that references the local XML file.
3. ---
You are analyzing a Windows client application that uses Microsoft Visual Studio 2010 and Microsoft SQL Server 2008.
The application updates two database tables from the main user interface (UI) thread.
You need to ensure that the following requirements are met:
The database tables are either updated simultaneously or not updated at all.
Users are notified of the success or failure of the updates.
Users are able to perform other tasks during the update process.
What should you do?
A) Move the database update logic to a BackgroundWorker thread.
Ensure that the thread is enclosed in a TransactionScope Using block in the BackgroundWorkerDoWork method.
B) Use TransactionScope in a Using block on the UI thread.
Batch the database updates by setting the DbDataAdapter.UpdateBatchSize property to 2.
C) Use TransactionScope in a Using block on the UI thread.
Create a DependentTransaction object within the block and pass the object to the BackgroundWorkerReportProgress method.
Use the object in the ReportProgress method to create a new TransactionScope block.
D) Use TransactionScope in a Using block on the main thread.
Create a BackgroundWorker thread within the block.
Move the database updates to the BackgroundWorkerDoWork method.
4. You are designing a new feature for an existing Windows Forms application by using Microsoft .NET Framework 4.
The application contains multiple forms that are loaded into a parent Multiple Document Interface (MDI) form. Your company policy does not allow the use of third-party controls.
You need to ensure that the new feature meets the following requirements: - It provides a three-dimensional scale model.
- It allows users to change the colors of the model and communicates the color
selections back to the application. - It allows the model to scale, based on the user's client computer display resolution. - It is a child form in the MDI application.
What should you do?
A) Design the new feature in the existing Windows Forms application as a Windows form.
Add the form as a child form to the MDI window.
B) Design the new feature in a new application by using Windows Presentation Foundation (WPF).
Invoke the new WPF application from the existing Windows Forms application.
C) Design the new feature by using a Windows Presentation Foundation (WPF) user control.
Use the ElementHost class to host the WPF user control in the existing Windows Forms application.
D) Design the new feature in a new Windows Presentation Foundation (WPF) application.
Host the existing application inside the new WPF application by using the WindowsFormsHost class
5. You are designing an n-tier Windows solution that includes a data entry application. The solution uses Microsoft .NET Framework 4 and Microsoft SQL Server 2008.
The data entry application sends customer orders to a middle-tier server. The middle-tier server sends orders to a set of services that perform operations on the orders. Business rules determine which services to call and whether to run them in sequence or in parallel. The business rules are complex and data dependent.
The Windows solution must meet the following requirements:
- Optimize application performance by using dynamic load balancing.
- Allow for business rules to be changed at runtime.
You need to recommend an approach that meets the requirements.
What should you recommend?
A) A routed service that uses Windows Communication Foundation (WCF) messaging
B) Private message queues with a controller class on the middle-tier server
C) SQL Server stored procedures
D) A Windows Communication Foundation (WCF) service for each operation, with a controller class on the middle-tier server
Solutions:
| Question # 1 Answer: B | Question # 2 Answer: A | Question # 3 Answer: A | Question # 4 Answer: C | Question # 5 Answer: A |
We're so confident of our products that we provide no hassle product exchange.


By Robin

