getcertified4sure.com

10 tips on exam 98 361




Master the mta exam 98 361 Microsoft MTA Software Development Fundamentals content and be ready for exam day success quickly with this Actualtests mta exam 98 361 exam prep. We guarantee it!We make it a reality and give you real mta exam 98 361 questions in our Microsoft software development fundamentals mta exam 98 361 braindumps.Latest 100% VALID Microsoft mta exam 98 361 Exam Questions Dumps at below page. You can use our Microsoft mta 98 361 braindumps and pass your exam.

Q31. You are developing an application that uses the Stack data structure. You write the following code: 

Stack first = new Stack(); first.Push(50); first.Push(45); first.Pop(); 

first.Push(11); 

first.Pop(); 

first.Push(7); 

What are the contents of the stack, from top to bottom, after these statements are executed? 

A. 7, 11, 50 

B. 7, 45 

C. 7, 50 

D. 7, 11, 45 

Answer:


Q32. You need to provide complex multi-way branching in your C# program. You need to make sure that your code is easy to read and understand. Which of the following C# statements should you use? 

A. case 

B. break 

C. if-else 

D. switch 

Answer:


Q33. You are creating a new class named Polygon. You write the following code: 

class Polygon : IComparable 

public double Length { get; set; } 

public double Width { get; set; } 

public double GetArea() 

return Length * Width; 

public int CompareTo(object obj) 

// to be completed 

You need to complete the definition of the CompareTo method to enable comparison of the Polygon objects. 

Which of the following code segments should you use? 

A. public int CompareTo(object obj) 

Polygon target = (Polygon)obj; 

double diff = this.GetArea() - target.GetArea(); 

if (diff == 0) 

return 0; 

else if (diff > 0) 

return 1; 

else return -1; 

B. public int CompareTo(object obj) 

Polygon target = (Polygon)obj; 

double diff = this.GetArea() - target.GetArea(); 

if (diff == 0) 

return 1; 

else if (diff > 0) 

return -1; 

else return 0; 

C. public int CompareTo(object obj) 

Polygon target = (Polygon)obj; 

if (this == target) 

return 0; 

else if (this > target) 

return 1; 

else return -1; } 

D. public int CompareTo(object obj) 

Polygon target = (Polygon)obj; 

if (this == target) 

return 1; 

else if (this > target) 

return -1; 

else return 0; 

Answer:


Q34. You are reviewing a C# program. The program contains the following class: 

public struct Rectangle { public double Length {get; set;} public double Width { get; set; } } 

The program executes the following code as part of the Main method: 

Rectangle r1, r2; 

r1 = new Rectangle { Length = 10.0, Width = 20.0 }; 

r2 = r1; 

r2.Length = 30; 

Console.WriteLine(r1.Length); 

What will be the output when this code is executed? 

A. 10 

B. 20 

C. 30 

D. 40 

Answer:


Q35. You are developing a C# program that needs to perform 5 iterations. You write the following code: 

01: int count = 0; 

02: while (count <= 5) 

03: { 

04: Console.WriteLine("The value of count = {0}", count); 

05: count++; 

06: } 

When you run the program, you notice that the loop does not iterate five times. What should you do to make sure that the loop is executed exactly five times? 

A. Change the code in line 01 to int count = 1; 

B. Change the code in line 02 to: while (count == 5) 

C. Change the code in line 02 to while (count >= 5) 

D. Change the code in line 05 to ++count; 

Answer:


Q36. You are writing a C# program and need to select an appropriate repetition structure for your requirement. You need to make sure that the test for the termination condition is performed at the bottom of the loop rather than at the top. Which repletion structure should you use? 

A. The while statement 

B. The for statement 

C. The foreach statement 

D. The do-while statement 

Answer:


Q37. You are developing an application that manages customers and their orders. Any solution that you develop must take the least amount of effort but offer the best performance.. Which of the following situations is not a good candidate for implementation with stored procedures in your application? 

A. Retrieving the list of all customers in the database 

B. Retrieving the list of all orders for particular customers 

C. Inserting a new order into the Orders table 

D. Ad hoc querying by the database administrator 

Answer:


Q38. Your C# program needs to return the total number of customers in a SQL Server database. The program will be used several times a day. What is the fastest way to return this information from your program? (Select all answers that apply.) 

A. Write a SQL query. 

B. Write a stored procedure. 

C. Use the SqlDataAdapter.Fill method. 

D. Use the SqlCommand.ExecuteScalar method. 

E. Use the OleDbDataAdapter.Fill method. 

Answer: BD 


Q39. You are developing an ASP.NET applications that calls Web service to retrieve inventory information. You know the URL of the Web service. You need to invoke the methods of this Web service within your Web application. How can you generate the client-side proxy classes so that you can use the Web methods? 

A. Use the Web service discovery tool. 

B. Copy the .ASMX file from the Web server to the ASP.NET application project. 

C. Copy the build output from the Web server to the ASP.NET application project. 

D. Set a Web reference to point to the Web service. 

Answer:


Q40. You are developing code for a method that calculates the discount for the items sold. You name the method CalculateDiscount. The method defines a variable, percentValue of the type double. You need to make sure that percentValue is accessible only within the CalculateDiscount method. What access modifier should you use when defining the percentValue variable? 

A. private 

B. protected 

C. internal 

D. public 

Answer: