70-483 Programming in C#

Loading demo links...

Showing 4–6 of 15 questions

Question 4 (Volume A)

HOTSPOT

You are implementing a library method that accepts a character parameter and returns a string.

If the lookup succeeds, the method must return the corresponding string value. If the lookup fails, the method must return the value "invalid choice."

You need to implement the lookup algorithm.

How should you complete the relevant code? (To answer, select the correct keyword in each drop-down list in the answer area.) Hot Area:

Answer is in the explanation below.

Question 5 (Volume A)

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

Select all that apply, then click Submit answer.

  • Insert the following code segment at line 17: while (sqlDataReader.GetValues())

  • Insert the following code segment at line 14: sqlConnection.Open();

  • Insert the following code segment at line 14: sqlConnection.BeginTransaction();

  • Insert the following code segment at line 17: while (sqlDataReader.Read())

  • Insert the following code segment at line 17: while (sqlDataReader.NextResult())

Question 6 (Volume B)

You are modifying an application that processes loans. The following code defines the Loan class. (Line numbers are included for reference only.)

Loans are restricted to a maximum term of 10 years. The application must send a notification message if a loan request exceeds 10 years.

You need to implement the notification mechanism.

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

Select all that apply, then click Submit answer.

  • Option A

  • Option B

  • Option C

  • Option D

  • Option E

  • Option F