PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

How should you complete the relevant code?

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

You need to ensure that the security of the data is not compromised

You are developing two Windows Store style apps by using JavaScript. A Source app will
store sensitive customer information. A Target app will retrieve the stored information for
validation and further processing.
The Source app must secure data by using a private-public key pair. Only the Target app
must be able to consume data that has been secured by the Source app.
You need to ensure that the security of the data is not compromised.
What should you do?

You need to ensure that the second operation is invoked only if the data processing operation throws an unhand

You use the Task.Run() method to launch a long-running data processing operation. The
data processing operation often fails in times of heavy network congestion.
If the data processing operation fails, a second operation must clean up any results of the
first operation.
You need to ensure that the second operation is invoked only if the data processing
operation throws an unhandled exception.
What should you do?

How should you complete the relevant code?

DRAG DROP
You are developing a Windows Store style app by using JavaScript. The app will send and
receive encoded information and will display the encoded information to the user in a
decrypted and recognizable state.
You need to appropriately decrypt the encoded information.
How should you complete the relevant code? (To answer, drag the appropriate code
segments to the correct locations in the answer are a.
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.)

Which five actions should you perform in sequence?

DRAG DROP
You are developing a Windows Store app by using JavaScript. The app will use the
fileStream object to write text to a file.
You need to write the text to the file and ensure that the file is available to other apps.
Which five actions should you perform in sequence? (To answer, move the appropriate
actions from the list of actions to the answer area and arrange them in the correct order.)

Which two actions should you perform?

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

Leases are restricted to a maximum term of 5 years. The application must send a notification
message if a lease request exceeds 5 years.
You need to implement the notification mechanism.
Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two.)

Which code segment should you use?

You are developing an application that uses structured exception handling. The application
includes a class named ExceptionLogger.
The ExceptionLogger class implements a method named LogException by using the
following code segment:
public static void LogException(Exception ex)

You have the following requirements:
Log all exceptions by using the LogException() method of the ExceptionLogger class.
Rethrow the original exception, including the entire exception stack.
You need to meet the requirements.
Which code segment should you use?