Which code segment should you use?
You are developing an application that retrieves patient data from a web service. The
application stores the JSON messages returned from the web service in a string variable
named PatientAsJson. The variable is encoded as UTF-8. The application includes a class
named Patient that is defined by the following code:
You need to populate the Patient class with the data returned from the web service.
Which code segment should you use?
Which code segment should you insert at line BG14?
###BeginCaseStudy###
Case Study: 1
Scenario 1
Application Information
You are developing two Windows Store apps by using JavaScript: a Personal Trainer app and
a Client app. The apps will allow personal fitness trainers to interact with their remote clients.
Business Requirements- Personal Trainer Application
The Personal Trainer app must allow trainers to perform the following tasks:
• Create and store video and audio recordings of workout routines.
• View the profile and workout recordings for only one client at any time.
Business Requirements- Client Application
The Client app must allow clients to perform the following tasks:
• Browse a list of the trainer’s workout recordings.
• Record workouts by using the built-in webcam.
• Play, pause, restart, and stop workout recordings.
• If the capability is supported, allow the client’s webcam to pan as the client moves
around the room.
• Upload workout recordings for trainer review.
• Update their individual profiles to indicate workouts completed, calories burned, and
current weight.
The Client app must validate that the client’s subscription is valid.
Technical Requirements- General
The Client app must allow clients to perform the following tasks:
• Browse a list of the trainer’s workout recordings.
• Record workouts by using the built-in webcam.
• Play, pause, restart, and stop workout recordings.
• If the capability is supported, allow the client’s webcam to pan as the client moves
around the room.
• Upload workout recordings for trainer review.
• Update their individual profiles to indicate workouts completed, calories burned, and
current weight.
The Client app must validate that the client’s subscription is valid.
Technical Requirements- Hardware Requirements
The Personal Trainer and Client apps must support the following hardware requirements:
• Windows 8
• Webcam, microphone, and speakers
• Internet connection
While testing the apps, you identify the following issues:
• When you start the app for the first time, the system displays this warning message:
“This app needs permission to use your camera, which you can change in the app’s settings.”
• When you run the loadClientProfile( ) method in the clientData.js file, you receive an
“Access Denied” exception.
• The findCamera( ) method in the video.js file throws an exception on some devices.
• The recordVideo( ) method in the video.js file throws an exception when the device
does not support tilting.
###EndCaseStudy###
You need to retrieve the background task collection for the iteration loop.
Which code segment should you insert at line BG14?
Which code segment should you insert at line 03?
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.)
<code>
01 public string FormatCoins(string name, int coins)
02 {
03
04 }
</code>
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?
Which actions should you perform?
###BeginCaseStudy###
Case Study: 1
Scenario 1
Application Information
You are developing two Windows Store apps by using JavaScript: a Personal Trainer app and
a Client app. The apps will allow personal fitness trainers to interact with their remote clients.
Business Requirements- Personal Trainer Application
The Personal Trainer app must allow trainers to perform the following tasks:
• Create and store video and audio recordings of workout routines.
• View the profile and workout recordings for only one client at any time.
Business Requirements- Client Application
The Client app must allow clients to perform the following tasks:
• Browse a list of the trainer’s workout recordings.
• Record workouts by using the built-in webcam.
• Play, pause, restart, and stop workout recordings.
• If the capability is supported, allow the client’s webcam to pan as the client moves
around the room.
• Upload workout recordings for trainer review.
• Update their individual profiles to indicate workouts completed, calories burned, and
current weight.
The Client app must validate that the client’s subscription is valid.
Technical Requirements- General
The Client app must allow clients to perform the following tasks:
• Browse a list of the trainer’s workout recordings.
• Record workouts by using the built-in webcam.
• Play, pause, restart, and stop workout recordings.
• If the capability is supported, allow the client’s webcam to pan as the client moves
around the room.
• Upload workout recordings for trainer review.
• Update their individual profiles to indicate workouts completed, calories burned, and
current weight.
The Client app must validate that the client’s subscription is valid.
Technical Requirements- Hardware Requirements
The Personal Trainer and Client apps must support the following hardware requirements:
• Windows 8
• Webcam, microphone, and speakers
• Internet connection
While testing the apps, you identify the following issues:
• When you start the app for the first time, the system displays this warning message:
“This app needs permission to use your camera, which you can change in the app’s settings.”
• When you run the loadClientProfile( ) method in the clientData.js file, you receive an
“Access Denied” exception.
• The findCamera( ) method in the video.js file throws an exception on some devices.
• The recordVideo( ) method in the video.js file throws an exception when the device
does not support tilting.
###EndCaseStudy###
You need to separate the business and complex logic into components.
Which actions should you perform? (Each correct answer presents part of the solution.
Choose all that apply.)
Which class should you use?
You have an application that will send confidential information to a Web server.
You need to ensure that the data is encrypted when it is sent across the network.
Which class should you use?
Which JavaScript project properties should you set?
###BeginCaseStudy###
Case Study: 1
Scenario 1
Application Information
You are developing two Windows Store apps by using JavaScript: a Personal Trainer app and
a Client app. The apps will allow personal fitness trainers to interact with their remote clients.
Business Requirements- Personal Trainer Application
The Personal Trainer app must allow trainers to perform the following tasks:
• Create and store video and audio recordings of workout routines.
• View the profile and workout recordings for only one client at any time.
Business Requirements- Client Application
The Client app must allow clients to perform the following tasks:
• Browse a list of the trainer’s workout recordings.
• Record workouts by using the built-in webcam.
• Play, pause, restart, and stop workout recordings.
• If the capability is supported, allow the client’s webcam to pan as the client moves
around the room.
• Upload workout recordings for trainer review.
• Update their individual profiles to indicate workouts completed, calories burned, and
current weight.
The Client app must validate that the client’s subscription is valid.
Technical Requirements- General
The Client app must allow clients to perform the following tasks:
• Browse a list of the trainer’s workout recordings.
• Record workouts by using the built-in webcam.
• Play, pause, restart, and stop workout recordings.
• If the capability is supported, allow the client’s webcam to pan as the client moves
around the room.
• Upload workout recordings for trainer review.
• Update their individual profiles to indicate workouts completed, calories burned, and
current weight.
The Client app must validate that the client’s subscription is valid.
Technical Requirements- Hardware Requirements
The Personal Trainer and Client apps must support the following hardware requirements:
• Windows 8
• Webcam, microphone, and speakers
• Internet connection
While testing the apps, you identify the following issues:
• When you start the app for the first time, the system displays this warning message:
“This app needs permission to use your camera, which you can change in the app’s settings.”
• When you run the loadClientProfile( ) method in the clientData.js file, you receive an
“Access Denied” exception.
• The findCamera( ) method in the video.js file throws an exception on some devices.
• The recordVideo( ) method in the video.js file throws an exception when the device
does not support tilting.
###EndCaseStudy###
You need to enable debugging on the Personal Trainer app.
Which JavaScript project properties should you set? (Each correct answer presents part of
the solution Choose all that apply.)
You need to ensure that the unit test will pass
You are developing a class named EmployeeRoster. The following code implements the
EmployeeRoster class. (Line numbers are included for reference only.)
You create the following unit test method to test the EmployeeRoster class implementation:
You need to ensure that the unit test will pass.
What should you do?
Which code segment should you insert at line PL16?
###BeginCaseStudy###
Case Study: 2
Scenario 2
Background
You are developing a Windows Store app by using JavaScript. The app is named Getting
Around. The app will use geo-location to provide location-aware assistance to people who are
traveling. Users will record audio information about locations.
Full and trial versions of the app will be available from the Windows Store. The feature name
of the full version will be gettingAround. The trial version will be valid for 30 days.
Business Requirements
The Getting Around app must meet the following business requirements:
• Track the user’s current location in accordance with the Windows Certification
guidelines for devices and sensors.
• Notify the user about upcoming obstacles.
• Ensure that the user can play, pause, and stop audio recordings.
• Ensure that the user can listen to recordings on Digital Living Network Alliance
(DLNA)-compatible headphones.
Technical Requirements
The Getting Around app must meet the following technical requirements:
• Connect to the Internet.
• Use the device’s sensors to detect the user’s location.
• Every 15 minutes, poll an obstacles database that is stored in the cloud.
• Send messages about upcoming obstacles to the lock screen of the
user’s device as soon as an obstacle is detected.
• Enable the user to save the most recently recorded location information
on the device by using a DataCompositeValue object.
• Enable retrieval of audio recordings from a cloud server.
• Headphones, when connected, must use the Play To technology. The
PlayTo control that is used for streaming is named aplayer and is in the
HTML file that is used by the player.js file.
To assist with diagnostics and monitoring, the app must do the following:
• Place an audit log that will track touch events on the user’s device.
• Store the audit log in the user’s localSettings object.
• Ensure that the audit log can be sent by email to the support desk if the
user is having problems.
The app must support the following hardware requirements:
• Windows 8
• Microphone and speakers
• Internet connection
• DLNA-compatible hearing device (optional)
While testing the app, you establish the following:
• The app fails to detect the location on some devices.
• When connectivity is lost, access to the obstacle data is not available.
###EndCaseStudy###
You need to retrieve and register a DLNA-compatible device.
Which code segment should you insert at line PL16?
Which code segment should you use?
You are modifying an existing banking application.
The application includes an Account class and a Customer class. The following code
segment defines the classes.
You populate a collection named customerCollection with Customer and Account objects by
using the following code segment:
You create a largeCustomerAccounts collection to store the Account objects by using the
following code segment:
Collection<Account> largeCustomerAccounts = new Collection<Account> ();
All accounts with a Balance value greater than or equal to 1,000,000 must be tracked.
You need to populate the largeCustomerAccounts collection with Account objects.
Which code segment should you use?
You need to ensure that enough debugging information is available for MyApp.exe, so that if the application th
You are developing an application that produces an executable named MyApp.exe and an
assembly named MyApp.dll.
The application will be sold to several customers.
You need to ensure that enough debugging information is available for MyApp.exe, so that if
the application throws an error in a customer’s environment, you can debug the error in your
own development environment.
What should you do?