aiotestking uk

70-483 Exam Questions - Online Test


70-483 Premium VCE File

Learn More 100% Pass Guarantee - Dumps Verified - Instant Download
150 Lectures, 20 Hours

Q1. - (Topic 1) 

You are developing an application. The application includes classes named Mammal and Animal and an interface named IAnimal. 

The Mammal class must meet the following requirements: . It must either inherit from the Animal class or implement the IAnimal interface. . It must be inheritable by other classes in the application. You need to ensure that the Mammal 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: A,C 

Explanation: 

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 

Q2. - (Topic 2) 

You are evaluating a method that calculates loan interest. The application includes the following code segment. (Line numbers are included for reference only.) 

When the loanTerm value is 5 and the loanAmount value is 4500, the loanRate must be set to 6.5 percent. 

You need to adjust the loanRate value to meet the requirements. 

What should you do? 

A. Replace line 15 with the following code segment: loanRate = 0.065m; 

B. Replace line 07 with the following code segment: loanRate = 0.065m; 

C. Replace line 17 with the following code segment: interestAmount = loanAmount * 0.065m * loanTerm; 

D. Replace line 04 with the following code segment: decimal loanRate = 0.065m; 

Answer:

Q3. - (Topic 1) 

You are developing an application. The application converts a Location object to a string by using a method named WriteObject. 

The WriteObject() method accepts two parameters, a Location object and an XmlObjectSerializer object. 

The application includes the following code. (Line numbers are included for reference only.) 

You need to serialize the Location object as XML. 

Which code segment should you insert at line 20? 

A. new XmlSerializer(typeof(Location)) 

B. new NetDataContractSerializer() 

C. new DataContractJsonSerializer(typeof (Location)) 

D. new DataContractSerializer(typeof(Location)) 

Answer:

Explanation: 

The code is using [DataContract] attribute here so need to used DataContractSerializer class. 

Q4. - (Topic 2) 

You are developing code for an application that retrieves information about Microsoft .NET Framework assemblies. 

The following code segment is part of the application (line numbers are included for reference only): 

You need to insert code at line 04. The code must load the assembly. Once the assembly is loaded, the code must be able to read the assembly metadata, but the code must be denied access from executing code from the assembly. 

Which code segment should you insert at line 04? 

A. Assembly.ReflectionOnlyLoadFrom(bytes); 

B. Assembly.ReflectionOniyLoad(bytes); 

C. Assembly.Load(bytes); 

D. Assembly.LoadFrom(bytes); 

Answer:

Q5. - (Topic 2) 

You are developing an application. 

The application contains the following code: 

When you compile the code, you receive the following syntax error message: "A previous catch clause already catches all exceptions of this or a super type ('System.Exception')." 

You need to ensure that the code can be compiled. What should you do? 

A. Catch the ArgumentException exception instead of the ArgumentNullException exception. 

B. Throw a new exception in the second catch block. 

C. Catch the ArgumentNullException exception first. 

D. Re-throw the exception caught by the second catch block. 

Answer:

Q6. - (Topic 2) 

You have the following code (line numbers are included for reference only): 

You need to ensure that if an exception occurs, the exception will be logged. Which code should you insert at line 28? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: * XmlWriterTraceListener 

Directs tracing or debugging output as XML-encoded data to a TextWriter or to a Stream, 

such as a FileStream. 

* TraceListener.TraceEvent Method (TraceEventCache, String, TraceEventType, Int32) Writes trace and event information to the listener specific output. 

Syntax: 

[ComVisibleAttribute(false)] 

public virtual void TraceEvent( 

TraceEventCache eventCache, 

string source, 

TraceEventType eventType, 

int id 

Q7. - (Topic 1) 

You are developing an application that uses a .config file. 

The relevant portion of the .config file is shown as follows: 

You need to ensure that diagnostic data for the application writes to the event tog by using the configuration specified in the .config file. 

What should you include in the application code? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q8. - (Topic 1) 

You have a List object that is generated by executing the following code: 

You have a method that contains the following code (line numbers are included for reference only): 

You need to alter the method to use a lambda statement. How should you rewrite lines 03 through 06 of the method? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q9. - (Topic 2) 

You are developing an application. 

The application contains the following code segment (line numbers are included for reference only): 

When you run the code, you receive the following error message: "Cannot implicitly convert type 'object'' to 'inf. An explicit conversion exists (are you missing a cast?)." 

You need to ensure that the code can be compiled. 

Which code should you use to replace line 05? 

A. var2 = ((List<int>) array1) [0]; 

B. var2 = array1[0].Equals(typeof(int)); 

C. var2 = Convert.ToInt32(array1[0]); 

D. var2 = ((int[])array1)[0]; 

Answer:

Explanation: Make a list of integers of the array with = ( (List<int>)arrayl) then select the first item in the list with [0]. 

Q10. - (Topic 2) 

You are developing an application that contains a class named TheaterCustomer and a method named ProcessTheaterCustomer. The ProcessTheaterCustomer() method accepts a TheaterCustomer object as the input parameter. 

You have the following requirements: 

. Store the TheaterCustomer objects in a collection. 

. Ensure that the ProcessTheaterCustomer() method processes the TheaterCustomer objects in the reverse order in which they are placed into the collection. 

You need to meet the requirements. 

What should you do? 

A. Create a System.Collections.Queue collection. Use the Enqueue() method to add TheaterCustomer objects to the collection. Use the Dequeue() method to pass the objects to the ProcessTheaterCustomer() method. 

B. Create a System.Collections.ArrayList collection. Use the Insert() method to add TheaterCustomer objects to the collection. Use the Remove() method to pass the objects to the ProcessTheaterCustomer() method. 

C. Create a System.Collections.Stack collection. Use the Push() method to add TheaterCustomer objects to the collection. Use the Pop() method to pass the objects to the ProcessTheaterCustomer() method. 

D. Create a System.Collections.Queue collection. Use the Enqueue() method to add TheaterCustomer objects to the collection. Use the Peek() method to pass the objects to the ProcessTheaterCustomer() method. 

Answer:

Explanation: A stack is the appropriate collection here. In computer science, a stack or LIFO (last in, first out) is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the last element that was added. 

Reference: https://en.wikipedia.org/wiki/Stack_(abstract_data_type)