Question: Please help me with this C# quiz QUESTION 1 Enabling multiple implementations of the same behaviors so that the appropriate implementation can be executed based

Please help me with this C# quiz

QUESTION 1

Enabling multiple implementations of the same behaviors so that the appropriate implementation can be executed based on the situation describes ____ as it relates to object oriented development.

a.

encapsulation

b.

abstraction

c.

inheritance

d.

polymorphism

QUESTION 2

Once a DLL is available, any application can add a reference to the DLL. The referenced file with the .dll extension becomes part of the applications private assembly.

True

False

QUESTION 3

Constructors, which use the same identifier as their class, are normally defined with protected access.

True

False

QUESTION 4

Object-oriented development focuses on designing classes that can be reused. One way to ensure this reuse is through designing and building components that can be stored in a library and called on when needed.

True

False

QUESTION 5

public static void ExchangeContents (ref T value1, ref T value2)

{

T temp;

temp = value1;

value1 = value2;

value2 = temp;

}

Which of the following is TRUE regarding the above segment of code?

a.

T is a placeholder for the data type.

b.

The segment of code is defining a generic method.

c.

All of the above

d.

Data in the memory locations value1 and value2 are swapped.

QUESTION 6

One way to write reusable code is to use the object data type for instance data members. Doing so then requires ____.

a.

using a stack to store the items

b.

creating generic classes

c.

casting and unboxing the data type

d.

moving the data type into a predefined type

QUESTION 7

Classes can have a has a relationship. This is a concept called ____ or aggregation.

a.

polymorphism

b.

is a

c.

inheritance

d.

containment

QUESTION 8

Protected access enables derived classes to have access to change data in the base class.

True

False

QUESTION 9

Class library components should be compiled using a Build option instead of Running the application.

True

False

QUESTION 10

Prior to the introduction of generics, one way to write reusable code was to use the ____ data type for instance data members.

a.

string

b.

object

c.

interface

d. var

QUESTION 11

If an event that creates a problem happens frequently, it is best to write instructions to take care of the problem with ____.

a.

try...catch clauses

b.

conditional expressions

c.

exceptions

d.

try...catch...finally blocks

QUESTION 12

What order should ArithmeticException, DivideByZeroException, and Exception catch clauses be placed in a try...catch block?

a.

Exception, ArithmeticException, DivideByZeroException,

b.

DivideByZeroException, ArithmeticException, Exception

c.

Exception, ArithmeticException, DivideByZeroException

d.

ArithmeticException, DivideByZeroException, Exception

QUESTION 13

During the compilation stage, the errors that are detected are those that violate the logic of the application.

True

False

QUESTION 14

When an unexpected error occurs in the try block that throws an exception, control transfers ____.

a.

to the first listed matching catch clause

b.

outside the try...catch...finally block

c.

to the finally block

d.

back to the first statement in the try clause

QUESTION 15

If you write a try...catch clause, you must include a finally block.

True

False

QUESTION 16

An exception handler is a ____.

a.

trace of methods invoked during the problem

b.

menu option under the debugger

c.

Windows event handler

d.

block of code that is executed when an exception occurs

QUESTION 17

When an unhandled exception message is displayed, the method that raised the exception is listed last.

True

False

QUESTION 18

____ is/are used to facilitate managing exceptions in a consistent, efficient way.

a.

Loops

b.

if...else

c.

Event handlers

d.

try...catch...finally

QUESTION 19

If a try block is included, you must also specify a catch clause.

True

False

QUESTION 20

While in debug mode, you can look inside a method and examine the methods program statements using ____.

a.

Step Into

b.

Step Out

c.

Step Inside

d.

Step Over

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!