Question 31
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?
Question 32
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 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.)
Question 33
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?
Question 34
You have the following class definitions.
There might be other classes derived from Shape.
You are creating an application that evaluates whether an object is a square, a rectangle, or another shape.
You need to implement a switch statement that meets the following requirements:
* If the shape variable is of the Rectangle type, and the width and the height are NOT equal, the output must be Rectangle.
* If the shape variable is of the Rectangle type, and the width and the height are equal, the output must be Square.
* If the shape variable is of any other Shape derived type, the output must be Unknown.
* If the shape variable does NOT refer to an object, the output must be Empty.
How should you complete the code? To answer, select the appropriate options in the answer area
.
NOTE: Each correct selection is worth one point.
Question 35
You are developing an application by using C#. The application will output the text string "First Line" followed by the text string "Second Line".
You need to ensure that an empty line separates the text strings.
Which four code segments should you use in sequence? (To answer, move the appropriate code segments to the answer area and arrange them in the correct order.)






