Question 16
You are evaluating a method that calculates loan interest. The application includes the following code segment. (Line numbers are included for reference only.)
When the loanTerm value is 5 and the loanAmount value is 4500, the loanRate must be set to 6.5 percent.
You need to adjust the loanRate value to meet the requirements.
What should you do?
Question 17
You have an existing order processing system that accepts .xml files,
The following code shows an example of a properly formatted order in XML:
You create the following class that will be serialized:
For each of the following properties, select Yes if the property is serialized according to the defined schema. Otherwise, select No.
Question 18
You are developing a game that allows players to collect from 0 through 1000 coins. You are creating a method that will be used in the game. The method includes the following code. (Line numbers are included for reference only.)
01 public string FormatCoins(string name, int coins)
02 {
04 }
The method must meet the following requirements:
Return a string that includes the player name and the number of coins. Display the number of coins without leading zeros if the number is 1 or greater. Display the number of coins as a single 0 if the number is 0.
You need to ensure that the method meets the requirements.
Which code segment should you insert at line 03?
---
Question 19
You are developing an application that includes the following code segment. (Line numbers are included for reference only.)
---
The GetCustomers() method must meet the following requirements:
Connect to a Microsoft SQL Server database.
Populate Customer objects with data from the database.
Return an IEnumerable<Customer> collection that contains the populated
Customer objects.
You need to meet the requirements.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Question 20
DRAG DROP
You are developing an application by using C#. The application includes an array of decimal values named loanAmounts. You are developing a LINQ query to return the values from the array.
The query must return decimal values that are evenly divisible by two. The values must be sorted from the lowest value to the highest value.
You need to ensure that the query correctly returns the decimal values.
How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)


