Exam Code: microsoft 70 483 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Programming in C#
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass microsoft exam 70 483 Exam.
Q121. - (Topic 2)
You need to create a method that can be called by using a varying number of parameters.
What should you use?
A. derived classes
B. interface
C. enumeration
D. method overloading
Answer: D
Explanation: Member overloading means creating two or more members on the same type that differ only in the number or type of parameters but have the same name. Overloading is one of the most important techniques for improving usability, productivity, and readability of reusable libraries. Overloading on the number of parameters makes it possible to provide simpler versions of constructors and methods. Overloading on the parameter type makes it possible to use the same member name for members performing identical operations on a selected set of different types.
Q122. HOTSPOT - (Topic 2)
You have the following code:
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Answer:
Q123. - (Topic 2)
You are creating an application that reads from a database.
You need to use different databases during the development phase and the testing phase by using conditional compilation techniques.
What should you do?
A. Configure the Define TRACE constant setting in Microsoft Visual Studio.
B. Decorate the code by using the [DebuggerDisplay("Mydebug")] attribute.
C. Configure the Define DEBUG constant setting in Microsoft Visual Studio.
D. Disable the strong-name bypass feature of Microsoft .NET Framework in the registry.
Answer: C
Explanation: Use one debug version to connect to the development database, and a standard version to connect to the live database.
Q124. - (Topic 2)
You are developing a method named GenerateHash that will create the hash value for a file. The method includes the following code. (Line numbers are included for reference only.)
You need to return the cryptographic hash of the bytes contained in the fileBuffer variable. Which code segment should you insert at line 05?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Q125. - (Topic 1)
You are developing an application. The application includes classes named Employee and Person and an interface named IPerson.
The Employee class must meet the following requirements:
. It must either inherit from the Person class or implement the IPerson interface. . It must be inheritable by other classes in the application.
You need to ensure that the Employee class meets the requirements.
Which two code segments can you use to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B,D
Explanation:
Sealed - When applied to a class, the sealed modifier prevents other classes from inheriting from it. http://msdn.microsoft.com/en-us/library/88c54tsw(v=vs.110).aspx
Q126. - (Topic 2)
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.)
01 public string FormatCoins(string name, int coins)
02 {
04 }
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?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Q127. - (Topic 2)
You are implementing a method named ProcessFile that retrieves data files from web servers and FTP servers. The ProcessFile () method has the following method signature:
Public void ProcessFile(Guid dataFileld, string dataFileUri)
Each time the ProcessFile() method is called, it must retrieve a unique data file and then save the data file to disk.
You need to complete the implementation of the ProcessFile() method. Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Explanation: * WebRequest.Create Method (Uri)
Initializes a new WebRequest instance for the specified URI scheme.
* Example:
1. To request data from a host server
Create a WebRequest instance by calling Create with the URI of the resource.
C#
WebRequest request = WebRequest.Create("http://www.contoso.com/");
2. Set any property values that you need in the WebRequest. For example, to enable authentication, set the Credentials property to an instance of the NetworkCredential class.
C#
request.Credentials = CredentialCache.DefaultCredentials;
3. To send the request to the server, call GetResponse. The actual type of the returned WebResponse object is determined by the scheme of the requested URI.
C#
WebResponse response = request.GetResponse();
4. To get the stream containing response data sent by the server, use the GetResponseStream method of the WebResponse.
C#
Stream dataStream = response.GetResponseStream ();
Q128. DRAG DROP - (Topic 2)
You have a method that will evaluate a parameter of type Int32 named Status. You need to ensure that the method meets the following requirements:
If Status is set to Active, the method must return 1.
If Status is set to Inactive, the method must return 0.
If Status is any other value, the method must return -1.
What should you do? (To answer, drag the appropriate statement to the correct location in the answer area. Each statement 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.)
Answer:
Q129. DRAG DROP - (Topic 2)
You are developing a class named Temperature.
You need to ensure that collections of Temperature objects are sortable.
You have the following code:
Which code segments should you include in Target 1, Target 2 and Target 3 to complete the code? (To answer, drag the appropriate code segments to the correct targets in the answer area. 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.)
Answer:
Q130. - (Topic 2)
You are developing an application that includes methods named EvaluateLoan, ProcessLoan, and FundLoan. The application defines build configurations named TRIAL, BASIC, and ADVANCED.
You have the following requirements:
The TRIAL build configuration must run only the EvaluateLoan() method.
The BASIC build configuration must run all three methods.
The ADVANCED build configuration must run only the EvaluateLoan() and
ProcessLoan() methods.
You need to meet the requirements.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C