Act now and download your Microsoft software development fundamentals mta exam 98 361 test today! Do not waste time for the worthless Microsoft software development fundamentals mta exam 98 361 tutorials. Download Replace Microsoft Microsoft MTA Software Development Fundamentals exam with real questions and answers and begin to learn Microsoft software development fundamentals mta exam 98 361 with a classic professional.
Q21. You created a class named GeoShape. You defined a method called Area in the GeoShape class. This method calculates the area of a geometric shape. You want the derived classes of GeoShape to supersede this functionality to support the area calculation of additional geometric shapes. When the method Area is invoked on a GeoShape object, the area should be calculated based on the runtime type of the GeoShape object. Which keyword should you use with the definition of the Area method in the GeoShape class?
A. abstract
B. virtual
C. new
D. overrides
Answer: B
Q22. You are writing a method named PrintReport that doesn't return a value to the calling code. Which keyword should you use in your method declaration to indicate this fact?
A. void
B. private
C. int
D. string
Answer: A
Q23. You have created a new Web service that provides mapping data. You are working in a Visual Studio environment and use C# as your programming language. You need to test the Web service to ensure that it is returning correct results. What is the easiest way to test your new Web service?
A. Copy and paste the Web service code into ASP.NET Web Applications. Run the Web application to see theresults.
B. Invoke the Web service from an ASP.NET client. Run the Web application to see the results.
C. Run the Web services project from within Visual Studio and use the test page that is displayed in the Webbrowser.
D. Have a large number of beta testers usetheWeb service and check for incorrect results.
Answer: C
Q24. You need a Windows Form similar to the W_RecForm form that is being already used by the application. However, you need a couple of extra controls on your form that are not available on W_RecForm. You need to make sure that you accomplish this requirement with the least coding effort. In future, if the W_RecForm is enhanced, you need to make sure that those enhancements are available in your form as well. What should you do?
A. Copy the code for W_RecForm to a new form. Modify the code for the new form.
B. Use visual inheritance to inherit the new form from W_RecForm. Add the new functionality to the newcontrol.
C. Modify the code for W_RecForm. Copy the code to create a new form.
D. Convert the code in the W_RecForm to a custom control. Use the new custom control in all places.
Answer: B
Q25. You are writing a C# program that needs to iterate a fixed number of times. You need to make sure that your code is easy to understand and maintain even when the loop body contains complex code. Which of the following C# statements provide the best solution for this requirement?
A. while
B. for
C. for each
D. do-while
Answer: B
Q26. You are developing an ASP.NET application using C#. On your Web page, you want to display the results returned by a C# method named GetShipmentStatus when the page is rendered to the client. Which of the following code segments should you use to call the GetShipmentStatus method?
A. <script language="c#" runat="server">
Response.Write(GetShipmentStatus());
</script>
B. <script language="c#" runat="client">
Response.Write(GetShipmentStatus());
</script>
C. <script language="c#">
Response.Write(GetShipmentStatus());
</script>
D. <%= GetShipmentStatus() %>
Answer: D
Q27. You are developing a C# program. You write the following code:
01: int count = 0;
02: while (count < 5)
03: {
04: if (count == 3)
05: break;
06: count++;
07: }
How many times will the control enter the while loop?
A. 5
B. 4
C. 3
D. 2
Answer: B
Q28. You are developing an algorithm before you write the C# program. You need to perform some calculations on a number. You develop the following flowchart for the calculation:
If the input value of n is 5, what is the output value of the variable fact according to this flowchart?
A. 720
B. 120
C. 24
D. 6
Answer: B
Q29. 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: C
Q30. 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: A