Filters
Question type

Study Flashcards

Components are implemented in C# through ____.


A) classes
B) encapsulation
C) namespaces
D) packages

E) A) and C)
F) B) and C)

Correct Answer

verifed

verified

You can think of an interface as a class that is totally ____________.

Correct Answer

verifed

verified

Variables declared as dynamic ____.


A) require boxing or casting to identify the actual data type
B) can hold any type of value
C) stores data as strings
D) must have an associated data type added as part of the declaration

E) C) and D)
F) A) and D)

Correct Answer

verifed

verified

Both var and ____________ enables developers to not associate a specific data type to the actual data when the memory declaration for the variable is written.

Correct Answer

verifed

verified

If a class implements more than one ____________, they all appear on the class definition line separated by commas.

Correct Answer

verifed

verified

When you have a method that has the same name in both the base and derived classes, use the keyword super to refer to the method in the base class.

A) True
B) False

Correct Answer

verifed

verified

Partial classes enable a class to be split into two or more files and combined when the application is compiled and ran.

A) True
B) False

Correct Answer

verifed

verified

Software components often take the form of classes or collections of methods.

A) True
B) False

Correct Answer

verifed

verified

Generics enable you to identify where data will change in the code segment by putting a placeholder in the code for the type parameters.

A) True
B) False

Correct Answer

verifed

verified

With C#, you have single inheritance, but a class can ____________ multiple interfaces.

Correct Answer

verifed

verified

A stack represents a simple ____________ collection.

Correct Answer

verifed

verified

last-in-fi...

View Answer

The base default constructor is called by ____.


A) adding base( ) :  between the constructor heading and the opening curly brace
B) typing base( ) : as the first executable statement in the derived constructor
C) adding className( ) :  between the constructor heading and the opening curly brace
D) typing base( ) : as the first executable statement in the Main( ) method

E) None of the above
F) A) and D)

Correct Answer

verifed

verified

____________ allows you to create a general class and then define specialized classes that have access to the members of the general class.

Correct Answer

verifed

verified

If you do not want subclasses to be able to provide new implementation details, you can add the keyword ____ to methods. Doing so keeps derived classes from being able to override the method.


A) partial
B) abstract
C) virtual
D) sealed

E) All of the above
F) B) and D)

Correct Answer

verifed

verified

public​ class A : B, C Which of the following statements is TRUE regarding the above declaration?


A) ​A is the base class.
B) ​B is the derived class.
C) ​C is an interface.
D) ​All of the above are correct.

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

An overloaded method must have exactly the same signature as the method it is overriding.

A) True
B) False

Correct Answer

verifed

verified

____ classes cannot be instantiated. ____ classes cannot be inherited.


A) Abstract, Sealed
B) Sealed. Abstract
C) Abstract, Abstract
D) Sealed, Sealed

E) B) and C)
F) None of the above

Correct Answer

verifed

verified

Multiple inheritance is not possible in C#; ____ provides the closest work around to this because a class can implement multiple ____.


A) interfaces
B) abstract classes
C) virtual classes
D) components

E) A) and C)
F) B) and D)

Correct Answer

verifed

verified

To override a method, the base method may include any of the following keywords, EXCEPT ____.


A) virtual
B) abstract
C) interface
D) override

E) None of the above
F) A) and D)

Correct Answer

verifed

verified

Use the ____ keyword to mark a class so that it can be used only as the base class from which other classes can be derived.


A) base
B) interface
C) virtual
D) abstract

E) C) and D)
F) All of the above

Correct Answer

verifed

verified

Showing 21 - 40 of 75

Related Exams

Show Answer