Replace 70-552: Actualtests real bootcamp from 18 to 34

Exact of 70-552 answers materials and rapidshare for Microsoft certification for consumer, Real Success Guaranteed with Updated 70-552 pdf dumps vce Materials. 100% PASS Today!

2016 Mar 70-552 Study Guide Questions:

Q18. A method in your Windows Forms application executes a stored procedure in a Microsoft SQL Server 2005 database, and then executes a second stored procedure in a second SQL Server 2005 database. You need to ensure that the call to the first stored procedure writes changes only if the call to the second stored procedure succeeds. Installation requirements prohibit you from introducing new components that use the COM+ hosting model. 

What should you do?

A. Implement a transactional serviced component.Add methods to this component to encapsulate the connect operation and execution of each stored procedure.Register and use this serviced component.

B. Add a TransactionScope block.Connect to each database and execute each stored procedure within the TransactionScope block.Call the TransactionScope.Complete method if the call to both stored procedure succeeds.

C. Connect to both databases.Call the SqlConnection.BeginTransaction method for each connection.Call the SqlTransaction.Commit method on both returned transactions only if both stored procedures succeed.

D. Add a try-catch-finally block.Connect to each database and execute each stored procedure in the try block.

Answer: B


Q19. 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.)

A. unit test

B. load test

C. integration test

D. coverage test

E. Web test

Answer: BC


Q20. You are configuring a ClickOnce deployment that allows users to install your application from the Internet zone under partial trust permissions. You want the application to access data that resides on the same remote server from which the application is installed. You need to add one or more types of data access that are allowed under partial trust permissions to your application. 

Which type or types of data access are allowed? (Choose all that apply.)

A. data access through HTTP with System.Net.WebClient

B. data access through XML Web services

C. data access through System.Data.SqlClient

D. data access through HTTP with System.Net.HttpWebRequest

Answer: ABD


Q21. You are creating an application that provides information about the local computer. The application contains a form that lists each logical drive along with the drive properties,such as type,volume label,and capacity.

You need to write a procedure that retrieves properties of each logical drive on the local computer.

What should you do?

To answer, move the three appropriate actions from the list of actions to the answer area and arrange them in the correct order.


Answer: 


Q22. You are creating a Windows Forms application. Initialization code loads a DataSet object named ds that includes a table named Users. The Users table includes a column named IsManager. You need to bind the IsManager column to the Checked property of a check box named chkIsManager. 

Which code segment should you use?

A. chkIsManager.DataBindings.Add("Checked", ds, "Users.IsManager");

B. chkIsManager.DataBindings.Add("Checked", ds, "IsManager");

C. chkIsManager.Text = "{Users.IsManager}";chkIsManager.AutoCheck = true;

D. this.DataBindings.Add("chkIsManager.Checked", ds, "Users.IsManager");

Answer: A


70-552 practice test

Replace 70-552 exam fees:

Q23. You create Microsoft Windows-based applications. You are creating a mathematics educational application. The application will be used to teach students about numeric series. One of the methods in the application is used to calculate a given member of the Fibonacci series. The method uses recursive calls to perform its calculation. The application calls the method synchronously, and only one instance of the application can be running at a given time. The application requirements state that the method must take less than 5 seconds to process when calculating any of the first 30 members of the Fibonacci series. You profile the application by using instrumentation. During profiling, you perform a call on the method that is used for calculating the 30th member of the Fibonacci series. The profiling report, which shows elapsed time in milliseconds, is shown in the exhibit. (Click the Exhibit button.) You need to evaluate the performance of the application based on the established requirements.

What should you conclude?


A. The report is inconclusive. A sample profiling is required to verify the requirements.

B. The report is inconclusive. A load test is required to verify the requirements.

C. The report is conclusive. The requirements are not met.

D. The report is conclusive. The requirements are met.

Answer: D


Q24. You are customizing a Windows Form to asynchronously update a database. You need to ensure that the form displays a message box to the user that indicates the success or failure of the update. 

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

A. private void StartBackgroundProcess() {

 bgwExecute.DoWork += new DoWorkEventHandler(WorkHandler);

 bgwExecute.RunWorkerCompleted += new RunWorkerCompletedEventHandler(CompletedHandler);

 bgwExecute.RunWorkerAsync();

}

B. private void StartBackgroundProcess() {

 bgwExecute.ProgressChanged += new ProgressChangedEventHandler(CompletedHandler);

 ThreadStart tsBackground = new ThreadStart(WorkHandler);

 bgwExecute.RunWorkerAsync(tsBackground); 

}

C. private void StartBackgroundProcess() {

 bgwExecute.RunWorkerCompleted += new RunWorkerCompletedEventHandler(CompletedHandler);

 ThreadStart tsBackground = new ThreadStart(WorkHandler);

 bgwExecute.RunWorkerAsync(tsBackground); 

}

D. void WorkHandler(object sender, DoWorkEventArgs e) {

 //...

 e.Result = true; 

}

E. void WorkHandler(object sender, DoWorkEventArgs e) {

 //...

 bgwExecute.ReportProgress(100, true); 

}

F. void CompletedHandler(object sender, RunWorkerCompletedEventArgs e) {

 bool result = (bool)e.Result;

 MessageBox.Show("Update " + (result ? "was successful" : "failed"));

}

G. void ProgressHandler(object sender, ProgressChangedEventArgs e) {

 bool result = (bool)e.UserState;

 MessageBox.Show("Update " + (result ? "was successful" : "failed"));

}

Answer: ADF


Q25. You are writing code for user authentication and authorization. The username, password, and roles are stored in your application data store. You need to establish a user security context that will be used for authorization checks such as IsInRole. You write the following code segment to authorize the user.

if (!TestPassword(userName, password))

throw new Exception("could not authenticate user");

String[] userRolesArray = LookupUserRoles(userName);

You need to complete this code so that it establishes the user security context. 

Which code segment should you use?

A. GenericIdentity ident = new GenericIdentity(userName);

GenericPrincipal currentUser = new GenericPrincipal(ident, userRolesArray);

Thread.CurrentPrincipal = currentUser;

B. WindowsIdentity ident = new WindowsIdentity(userName);

WindowsPrincipal currentUser = new WindowsPrincipal(ident);

Thread.CurrentPrincipal = currentUser;

C. NTAccount userNTName = new NTAccount(userName);

GenericIdentity ident = new GenericIdentity(userNTName.Value);

GenericPrincipal currentUser = new GenericPrincipal(ident, userRolesArray);

Thread.CurrentPrincipal = currentUser;

D. IntPtr token = IntPtr.Zero;

token = LogonUserUsingInterop(userName, encryptedPassword);

WindowsImpersonationContext ctx = WindowsIdentity.Impersonate(token);

Answer: A


Q26. You create Microsoft Windows-based applications. You create an application that accesses data on a Microsoft SQL Server 2005 database. You write the following code segment. (Line numbers are included for reference only.)

01 private void LoadData()

02 {

04 cn.Open();

05 daProducts.Fill(ds);

06 daCategories.Fill(ds);

07 cn.Close();

09 }

The cn variable points to a SqlConnection object. The SqlConnection object will be opened almost every time this code segment executes. You need to complete this code segment to ensure that the application continues to run even if the SqlConnection object is open. You also need to ensure that the performance remains unaffected. 

What should you do?

A. Add a Try block on line 03 along with a matching Catch block beginning on line 08 to handle the possible exception.

B. Add a Try block on line 03 along with a matching Finally block beginning on line 08 to handle the possible exception.

C. Add the following code to line 03.if (cn.ConnectionState!=ConnectionState.Open)

D. Add the following code to line 03.if (cn.ConnectionState==ConnectionState.Closed)

Answer: C


Q27. You are changing the security settings of a file named MyData.xml. You need to preserve the existing inherited access rules. You also need to prevent the access rules from inheriting changes in the future. 

Which code segment should you use?

A. FileSecurity security = new FileSecurity("mydata.xml",AccessControlSections.All);

security.SetAccessRuleProtection(true, true);

File.SetAccessControl("mydata.xml", security);

B. FileSecurity security = new FileSecurity();

security.SetAccessRuleProtection(true, true);

File.SetAccessControl("mydata.xml", security);

C. FileSecurity security = File.GetAccessControl("mydata.xml");

security.SetAccessRuleProtection(true, true);

D. FileSecurity security = File.GetAccessControl("mydata.xml");

security.SetAuditRuleProtection(true, true);

File.SetAccessControl("mydata.xml", security);

Answer: A


70-552 vce

Tested 70-552 exam:

Q28. You are creating a class that performs complex financial calculations. The class contains a method named GetCurrentRate that retrieves the current interest rate and a variable named currRate that stores the current interest rate. You write serialized representations of the class. You need to write a code segment that updates the currRate variable with the current interest rate when an instance of the class is deserialized. 

Which code segment should you use?

A. [OnSerializing]internal void UpdateValue (StreamingContext context) {

 currRate = GetCurrentRate();

}

B. [OnSerializing]internal void UpdateValue(SerializationInfo info) {

 info.AddValue("currentRate", GetCurrentRate());

}

C. [OnDeserializing]internal void UpdateValue(SerializationInfo info) {

 info.AddValue("currentRate", GetCurrentRate());

}

D. [OnDeserialized]internal void UpdateValue(StreamingContext context) {

 currRate = GetCurrentRate();

}

Answer: D


Q29. You are developing a method to call a COM component. You need to use declarative security to explicitly request the runtime to perform a full stack walk. You must ensure that all callers have the required level of trust for COM interop before the callers execute your method.

Which attribute should you place on the method?

A. [SecurityPermission( SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]

B. [SecurityPermission( SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]

C. [SecurityPermission( SecurityAction.Assert, Flags = SecurityPermissionFlag.UnmanagedCode)]

D. [SecurityPermission( SecurityAction.Deny, Flags = SecurityPermissionFlag.UnmanagedCode)]

Answer: A


Q30. You are using the Microsoft Visual Studio 2005 IDE to examine the output of a method that returns a string. You assign the output of the method to a string variable named fName.

You need to write a code segment that prints the following on a single line

The message: "Test Failed:"

The value of fName if the value of fName does not equal "John"

You also need to ensure that the code segment simultaneously facilitates uninterrupted execution of the application. Which code segment should you use?

A. Debug.Assert(fName == "John", "Test Failed: ", fName);

B. Debug.WriteLineIf(fName != "John", fName, "Test Failed");

C. if (fName != "John") {

 Debug.Print("Test Failed: ");

 Debug.Print(fName); 

}

D. if (fName != "John") {

 Debug.WriteLine("Test Failed: ");

 Debug.WriteLine(fName); 

}

Answer: B


Q31. You create Microsoft Windows-based applications.

You receive the following code segment to review. (Line numbers are included for reference only.)

01 public partial class frmReceivables : Form

02 {

03 private DataSet ds;

04 public frmReceivables()

05 {

06 InitializeComponent();

07 }

08 private void frmReceivables(object sender, EventArgs e) 

09 {

10 SqlConnection cn = new SqlConnection(strConnectionString); 

11 SqlDataAdapter daInvoices = new SqlDataAdapter("SELECT * FROM Invoices", cn); 

12 SqlDataAdapter daCustomers = new SqlDataAdapter("SELECT * FROM Customers", cn); 

13 ds = new DataSet("Receivables");

14 daInvoices.Fill(ds);

15 daCustomers.Fill(ds);

16 }

17 }

The strConnectionString variable is pre-populated from the application configuration file. Query statements will remain unchanged throughout the life cycle of the application. Connection pooling is not being used. This code segment accesses a Microsoft SQL Server 2000 database. The ds dataset is bound to a data grid view so that users can view and update data in the database. The code currently compiles correctly and works as intended. You need to enhance performance and reliability for this code. 

Which two actions should you recommend? (Each correct answer presents part of the solution. Choose two.)

A. Use an ODBC DSN instead of a connection string.

B. Use OleDbDataAdapter objects instead of SqlDataAdapter objects to populate the dataset.

C. Add a line of code before line 14 to open the database connection.

D. Add a Try...Catch block and close the connection in the catch block.

E. Add a Try...Catch...Finally block and close the connection in the Finally block.

Answer: CE


Q32. You are creating a Windows Forms application. You set the FlatAppearance.MouseOverBackColor property of a button to Blue. When testing the application, you notice that the background color does not change when you move the pointer over the button. You need to set the properties of the button so that the background color for the button changes to blue when the pointer moves over the button. 

What should you do?

A. Set the FlatStyle property to FlatStyle.Flat.

B. Set the FlatStyle property to FlatStyle.System.

C. Move the set statement for the FlatAppearance.MouseOverBackColor property to the Paint event.

D. Set the UseVisualStyleBackColor property to False.

Answer: A


Q33. You are developing an application that will deploy by using ClickOnce. You need to test if the application executes properly. You need to write a method that returns the object, which prompts the user to install a ClickOnce application. 

Which code segment should you use?

A. return ApplicationSecurityManager.ApplicationTrustManager;

B. return AppDomain.CurrentDomain.ApplicationTrust;

C. return new HostSecurityManager();

D. return SecurityManager.PolicyHierarchy();

Answer: A


Q34. You create Microsoft Windows-based applications. You are designing integration tests for an application that your team is developing. Your team uses an application framework that is developed in-house.

The application consumes the following elements:

Third-party Web services

A third-party API for sending text messages to mobile phones Components from the application framework to access SQL Server databases and e-mail messages Managed code to access flat files in the file system

You need to create a report that lists the components that must be considered for integration testing. 

Which two components should you include? (Each correct answer presents part of the solution. Choose two.)

A. Web services

B. messaging API

C. database access components from the application framework

D. messaging components from the application framework

E. managed code to access the file system

Answer: AB