PrepAway - Latest Free Exam Questions & Answers

Tag: Exam 70-483 (update May 25th, 2017)

Exam 70-483: Programming in C# (update May 25th, 2017)

which form should you implement the score member?

You are creating a class named Game.
The Game class must meet the following requirements:
• Include a member that represents the score for a Game instance.
• Allow external code to assign a value to the score member.
• Restrict the range of values that can be assigned to the score member.
You need to implement the score member to meet the requirements.
In which form should you implement the score member?

Which code segment should you use?

You are developing a C# application that includes a class named Product. The following code segment defines
the Product class:

You implement System.ComponentModel.DataAnnotations.IValidateableObject interface to provide a way tovalidate the Product object.
The Product object has the following requirements:
• The Id property must have a value greater than zero.
• The Name property must have a value other than empty or null.
You need to validate the Product object. Which code segment should you use?

Which two actions should you perform?

You are creating a class named Employee. The class exposes a string property named EmployeeType. The
following code segment defines the Employee class. (Line numbers are included for reference only.)
01 public class Employee
02 {
03 internal string EmployeeType
04 {
05 get;
06 set;
07 }
08 }
The EmployeeType property value must meet the following requirements:• The value must be accessed only by code within the Employee class or within a class derived from the
Employee class.
• The value must be modified only by code within the Employee class.
You need to ensure that the implementation of the EmployeeType property meets the requirements.
Which two actions should you perform? (Each correct answer represents part of the complete 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 Logger. The Logger class implements a method named Log by using the following code segment: 66
public static void Log(Exception ex) { }
You have the following requirements:
• Log all exceptions by using the Log() method of the Logger class.
• Rethrow the original exception, including the entire exception stack.You need to meet the requirements.
Which code segment should you use?

Which code segment should you insert at line 04?

You are implementing a method named FloorTemperature that performs conversions between value types and
reference types. The following code segment implements the method. (Line numbers are included for reference
only.)

You need to ensure that the application does not throw exceptions on invalid conversions.
Which code segment should you insert at line 04?

Which two actions should you perform?

You are creating a class named Employee. The class exposes a string property named EmployeeType. The
following code segment defines the Employee class. (Line numbers are included for reference only.)

The EmployeeType property value must be accessed and modified only by code within the Employee class or
within a class derived from the Employee class.You need to ensure that the implementation of the EmployeeType property meets the requirements.
Which two actions should you perform? (Each correct answer represents part of the complete solution. Choose
two.)

Which code segment should you insert at line 16?

You are developing a method named CreateCounters that will create performance counters for an
application. The method includes the following code. (Line numbers are included for reference only.)
01 void CreateCounters()
02 {
03 if (!PerformanceCounterCategory.Exists(“Contoso”))
04 {
05 var counters = new CounterCreationDataCollection();
06 var ccdCounter1 = new CounterCreationData
07 {
08 CounterName = “Counter1”,09 CounterType = PerformanceCounterType.AverageTimer32
11 };
12 counters.Add(ccdCounter1);
13 var ccdCounter2 = new CounterCreationData
14 {
15 CounterName = “Counter2”,
16
17 };
18 counters.Add(ccdCounter2);
19 PerformanceCounterCategory.Create(“Contoso”, “Help string”,
20 PerformanceCounterCategoryType.MultiInstance, counters);
21 }
22 }
You need to ensure that Counter2 is available for use in Windows Performance Monitor (PerfMon). Which
code segment should you insert at line 16?


Page 7 of 12« First...56789...Last »